{"id":18835297,"url":"https://github.com/ashwanikumar04/tensorflow-handson","last_synced_at":"2026-05-05T06:37:39.515Z","repository":{"id":88929258,"uuid":"125711525","full_name":"ashwanikumar04/tensorflow-handson","owner":"ashwanikumar04","description":"Tensor flow handson","archived":false,"fork":false,"pushed_at":"2018-03-22T14:40:55.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T07:44:06.014Z","etag":null,"topics":["tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashwanikumar04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-18T09:55:02.000Z","updated_at":"2018-03-22T14:41:37.000Z","dependencies_parsed_at":"2023-03-11T08:30:55.136Z","dependency_job_id":null,"html_url":"https://github.com/ashwanikumar04/tensorflow-handson","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwanikumar04%2Ftensorflow-handson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwanikumar04%2Ftensorflow-handson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwanikumar04%2Ftensorflow-handson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashwanikumar04%2Ftensorflow-handson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashwanikumar04","download_url":"https://codeload.github.com/ashwanikumar04/tensorflow-handson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239769932,"owners_count":19693968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tensorflow"],"created_at":"2024-11-08T02:15:41.251Z","updated_at":"2026-01-26T19:30:18.352Z","avatar_url":"https://github.com/ashwanikumar04.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Some handson on Tensor flow.\n\n## Hello Tensorflow\n\n\n```python\nimport tensorflow as tf\nhello_constant = tf.constant('Hello Constant')\nwith tf.Session() as sess:\n    output = sess.run(hello_constant)\nprint(output)\n```\n\n    b'Hello Constant'\n\n\n# Input\n\n\n```python\nx = tf.placeholder(tf.string)\nwith tf.Session() as sess:\n    output=sess.run(x,feed_dict={x:'Hello World'})\nprint(output)\n```\n\n    Hello World\n\n\n\n```python\nx = tf.placeholder(tf.int32)\nwith tf.Session() as sess:\n    output=sess.run(x,feed_dict={x:123})\nprint(output)\n```\n\n    123\n\n\n\n```python\n\n\n# TODO: Convert the following to TensorFlow:\nx = tf.constant(10)\ny = tf.constant(2)\nz = tf.subtract(tf.divide(x,y),tf.cast(tf.constant(1),tf.float64))\n\nwith tf.Session() as sess:\n    output=sess.run(z)\nprint(output)\n```\n\n    4.0\n\n\n\n```python\nnode1 = tf.constant(2)\nnode2 = tf.constant(3)\nwith tf.Session() as sess:\n    node3 = sess.run(node1+node2)\nprint(node3)\n```\n\n    5\n\n\n## TensorBoard\n\n\n\n```python\nimport tensorflow as tf\na = tf.constant(4,name='node_a')\nb = tf.constant(5,name='node_b')\nc = tf.multiply(a,b,name='multiply_c')\nd = tf.add(a,b,name='add_d')\ne = tf.add(c,d,name='add_e')\nsess = tf.Session()\noutput = sess.run(e)\nwriter = tf.summary.FileWriter('./graph1',sess.graph)\nwriter.close()\nsess.close()\n\n```\n\n## Run Tensorboard\n```\ntensorboard --logdir=graph1/\n\n```\n```\nStarting TensorBoard b'47' at http://0.0.0.0:6006\n(Press CTRL+C to quit)\n\n```\n\n# Linear Model\n\n\n```python\nimport tensorflow as tf\nW = tf.Variable([.3],tf.float32)\nb = tf.Variable([-.3],tf.float32)\nx = tf.placeholder(tf.float32)\nlinear_model = W*x+b\ninit = tf.global_variables_initializer()\ny = tf.placeholder(tf.float32)\nsquared_deltas = tf.square(linear_model-y)\nloss = tf.reduce_sum(squared_deltas)\noptmizer = tf.train.GradientDescentOptimizer(0.01)\ntrain = optmizer.minimize(loss)\nwith tf.Session() as sess:\n    sess.run(init)\n    print(sess.run(linear_model,{x:[1,2,3,4]}))\n    print(sess.run(loss,{x:[1,2,3,4],y:[0,-1,-2,-3]}))\n    \nprint('Training')\nwith tf.Session() as sess:\n    sess.run(init)\n    for i in range(1000):\n        sess.run(train,{x:[1,2,3,4],y:[0,-1,-2,-3]})\n    print(sess.run([W,b]))\n    \n\n\n```\n\n    [ 0.          0.30000001  0.60000002  0.90000004]\n    23.66\n    Training\n    [array([-0.9999969], dtype=float32), array([ 0.99999082], dtype=float32)]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwanikumar04%2Ftensorflow-handson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashwanikumar04%2Ftensorflow-handson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashwanikumar04%2Ftensorflow-handson/lists"}