摘要: 1.7.1计算导数使用theano.tensor.grad() 函数计算梯度>>> import theano>>> import theano.tensor as T>>> from theano import pp>>> x = T.dscalar('x')>>> y = x ** 2>>> gy = T.grad(y, x)>>> pp(gy)'((fill((x ** TensorCons... 阅读全文
posted @ 2014-06-06 15:00 fireae 阅读(1127) 评论(0) 推荐(0)
摘要: theano 实例, 逻辑回归(logistic regression)# -*- coding: utf-8 -*-"""Created on Fri Jun 06 08:56:54 2014@author: Administrator"""import theanoimport numpy as npimport theano.tensor as Tdef logistic_regressio... 阅读全文
posted @ 2014-06-06 14:55 fireae 阅读(893) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-"""Created on Thu Jun 05 17:48:31 2014@author: Administrator"""import theanoimport numpy as npimport theano.tensor as Tfrom theano.sandbox.rng_mrg import MRG_RandomStreamsfrom t... 阅读全文
posted @ 2014-06-06 14:12 fireae 阅读(614) 评论(0) 推荐(0)
摘要: 使用共享变量# -*- coding: utf-8 -*-"""Created on Wed Jun 4 23:28:21 2014@author: wencc"""from theano import sharedfrom theano import functionimport theano.tensor as Tif __name__ == '__main__':state = shared... 阅读全文
posted @ 2014-06-06 13:58 fireae 阅读(378) 评论(0) 推荐(0)
摘要: theano 入门教程1.3给一个参数设置默认值# -*- coding: utf-8 -*-"""Created on Wed Jun 4 23:22:17 2014@author: wencc"""import theano.tensor as Tfrom theano import functionfrom theano import Paramfrom theano import ppif... 阅读全文
posted @ 2014-06-06 13:46 fireae 阅读(314) 评论(0) 推荐(0)