From c148ac5005cbc85326887fde06c2dd3634b34936 Mon Sep 17 00:00:00 2001 From: yogesh agrawal Date: Thu, 20 Dec 2018 17:45:33 +0530 Subject: [PATCH 1/2] Update linear_regression.py changing variable initialization way as per tensorflow standards.thanks if any thing wrong i am going please let me know. i m beginner in tensorflow. --- examples/2_BasicModels/linear_regression.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/2_BasicModels/linear_regression.py b/examples/2_BasicModels/linear_regression.py index cfb1c2fa..e840e006 100644 --- a/examples/2_BasicModels/linear_regression.py +++ b/examples/2_BasicModels/linear_regression.py @@ -28,9 +28,9 @@ X = tf.placeholder("float") Y = tf.placeholder("float") -# Set model weights -W = tf.Variable(rng.randn(), name="weight") -b = tf.Variable(rng.randn(), name="bias") +# Set model weights and bias as variable (get_variable uses is recommended by tensorflow) +W = tf.get_variable(initializer=rng.randn(), name="weight") +b = tf.get_variable(initializer= rng.randn(), name="bias") # Construct a linear model pred = tf.add(tf.multiply(X, W), b) From 4231cb0b71829e258ced3ab56cfac8386f635719 Mon Sep 17 00:00:00 2001 From: yogesh agrawal Date: Wed, 22 May 2019 15:23:39 +0530 Subject: [PATCH 2/2] Created using Colaboratory --- Basic_classification.ipynb | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Basic_classification.ipynb diff --git a/Basic_classification.ipynb b/Basic_classification.ipynb new file mode 100644 index 00000000..cab5c699 --- /dev/null +++ b/Basic_classification.ipynb @@ -0,0 +1,41 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Basic_classification.ipynb", + "version": "0.3.2", + "provenance": [], + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "tg59Bsuz9SF0", + "colab_type": "code", + "colab": {} + }, + "source": [ + "" + ], + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file