Theano
来源:互联网 发布:土方工程量计算软件 编辑:程序博客网 时间:2024/05/11 01:51
基础
Theano.Tensor
>>> import theano>>> import theano.tensor as T>>> x = T.dmatrix('x')>>> s = 1 / (1 + T.exp(-x))>>> logistic = theano.function([x], s)>>> logistic([[0, 1], [-1, -2]])array([[ 0.5 , 0.73105858], [ 0.26894142, 0.11920292]])>>> x=T.dscalar("xname")>>> type(x)<class 'theano.tensor.var.TensorVariable'>>>> x.type#x是变量,x变量的类型是(float64, scalar)TensorType(float64, scalar)
共享变量
在不同的函数调用之间共享
>>> from theano import shared>>> state=shared(0)>>> inc = T.iscalar('inc')>>> accumulator = function([inc], state, updates=[(state, state+inc)])#update的格式为(shared-variable, new expression)或directory>>> accumulator(1)array(0)#返回原来的state值>>> state.get_value()1>>> accumulator(8)array(1)>>> state.get_value()9>>> state.set_value(1)>>> state.get_value()1
参考
1.图结构
http://www.deeplearning.net/software/theano/extending/graphstructures.html#graphstructures
2.
0 0
- theano
- Theano
- theano
- Theano
- theano教程
- theano相关
- 安装Theano
- theano安装
- Theano安装
- Theano installation
- theano 学习
- theano 2
- theano 3
- theano 安装
- theano学习
- 安装theano
- Installing Theano
- 配置theano
- 这篇博客的目的在于简单介绍如何快速上手使用Spring MVC框架
- NTModel框架与通信(含使用服务加载驱动)
- file-max
- UIImage高斯模糊
- 管理类-项目管理-处事管理
- Theano
- hive与hbase整合
- Android开发学习笔记:数据存取之SQLite浅析
- vmware下openfiler的ip设置
- iOS发布app到App Store教程
- 一台电脑如何管理多个SSH KEY
- 21个数据科学家面试必须知道的问题和答案
- Rhino -- 基于java的javascript实现
- 使用UICollectionView制作滑动viewpage