Theano
阿卡蒂奥
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
theano学习——数据类型
数据类型theano中常用数据类型: byte: bscalar, bvector, bmatrix, btensor3, btensor4 16-bit integers: wscalar, wvector, wmatrix,wtensor3, wtensor4 32-bit integers: iscalar, ivector, imatrix, itensor3, itensor4 6原创 2017-10-16 10:42:05 · 642 阅读 · 0 评论 -
theano学习--theano.function
theano.function标量的运算:import theano.tensor as T x0 = T.dscalar('x0') x1 = T.dscalar('x1') aver = (x0 + x1)/2 f = theano.function([x0, x1], aver) y = f(1,2) print y print type(f) print type(x0)输出:1.5 <cl原创 2017-10-20 19:01:50 · 6404 阅读 · 1 评论 -
theano学习--theano.shared共享变量
theano.shared可以看作是将变量设置为全局变量,其值可以在多个函数中共用.1. 通过get_value()、set_value()可以查看、设置共享变量的数值;import numpy, theano np_array = numpy.ones(2, dtype='float32') s_default = theano.shared(np_array)print s_default pr原创 2017-10-20 19:38:19 · 2454 阅读 · 1 评论 -
theano学习--theano.tensor
dot是theano的tensor变量的点乘操作 T.dot接受两个矩阵(向量)输入, 计算它们的点积并返回一个保存了点乘信息的节点对象, 返回对象调用eval()可获得实际数值结果 import theano.tensor as T x = T.dot([[1,2],[4,5]],[[1,1],[1,0]]) print x.eval() print type(x)原创 2017-10-20 21:42:39 · 2115 阅读 · 0 评论 -
theano学习--conv2d
import theano.tensor as T inputs = T.tensor4(name='input', dtype='float64') conv_out = T.nnet.conv.conv2d(inputs, [[[[1., 0.]],[[0., 1.]]]]) f = theano.function([inputs], conv_out) i = np.asarray([[[原创 2017-10-23 12:37:28 · 869 阅读 · 0 评论
分享