提交 ae44d1da authored 作者: amrithasuresh's avatar amrithasuresh

Updated numpy as np

上级 42213046
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
# Solution to Exercise in section 'Configuration Settings and Compiling Modes' # Solution to Exercise in section 'Configuration Settings and Compiling Modes'
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
import numpy import numpy as np
import theano import theano
import theano.tensor as tt import theano.tensor as tt
theano.config.floatX = 'float32' theano.config.floatX = 'float32'
rng = numpy.random rng = np.random
N = 400 N = 400
feats = 784 feats = 784
...@@ -21,7 +21,7 @@ training_steps = 10000 ...@@ -21,7 +21,7 @@ training_steps = 10000
x = tt.matrix("x") x = tt.matrix("x")
y = tt.vector("y") y = tt.vector("y")
w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w") w = theano.shared(rng.randn(feats).astype(theano.config.floatX), name="w")
b = theano.shared(numpy.asarray(0., dtype=theano.config.floatX), name="b") b = theano.shared(np.asarray(0., dtype=theano.config.floatX), name="b")
x.tag.test_value = D[0] x.tag.test_value = D[0]
y.tag.test_value = D[1] y.tag.test_value = D[1]
#print "Initial model:" #print "Initial model:"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论