From 77979dbb1db8b4894bde9259ced17bf19bf0532d Mon Sep 17 00:00:00 2001 From: wangweiboss <1017395252@qq.com> Date: Mon, 8 Aug 2016 23:36:44 +0800 Subject: [PATCH] Update theano4_basic_usage.py --- theanoTUT/theano4_basic_usage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theanoTUT/theano4_basic_usage.py b/theanoTUT/theano4_basic_usage.py index 786e42f1..9655d93d 100644 --- a/theanoTUT/theano4_basic_usage.py +++ b/theanoTUT/theano4_basic_usage.py @@ -17,7 +17,7 @@ z = x+y # define the actual function in here f = function([x, y], z) # the inputs are in [], and the output in the "z" -print(f(2,3)) # only give the inputs "x and y" for this function, then it will calculate the output "z" +print(f(2,3)) # only give the inputs "x and y" for this function, then it will calculate the output "z"注意传参的方式,没有[] # to pretty-print the function from theano import pp @@ -28,4 +28,4 @@ y = T.dmatrix('y') z = x + y f = function([x, y], z) -print(f(np.arange(12).reshape((3,4)), 10*np.ones((3,4)))) +print(f(np.arange(12).reshape((3,4)), 10*np.ones((3,4))))#注意ones的使用方法ones(shape, dtype, order)