diff --git a/theanoTUT/theano4_basic_usage.py b/theanoTUT/theano4_basic_usage.py index 786e42f..9655d93 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)