From 0b79ef2067df8ee4140b5093d422375247b5aecc Mon Sep 17 00:00:00 2001 From: Kasun Thennakoon Date: Sat, 5 Dec 2015 17:11:03 +0530 Subject: [PATCH] Update MLP_theano_with_comments.ipynb Use 'numpy' without importing, so getting `NameError: name 'numpy' is not defined` --- MLP_theano_with_comments.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MLP_theano_with_comments.ipynb b/MLP_theano_with_comments.ipynb index e6dd2bb..905c9e2 100644 --- a/MLP_theano_with_comments.ipynb +++ b/MLP_theano_with_comments.ipynb @@ -96,6 +96,8 @@ "# These are hyperparameters to play with.\n", "# Bias starting as zero is fine.\n", "import numpy.random as rng\n", + "import numpy\n", + "W_x = numpy.asarray(rng.normal(loc=0.0, scale=.05, size=(28*28, 500)), dtype=theano.config.floatX)\n", "b_h = numpy.zeros(shape=(500,), dtype=theano.config.floatX)\n", "\n",