Python 如何在本地使用sageMath安装Theano库?

Python 如何在本地使用sageMath安装Theano库?,python,machine-learning,theano,sage,Python,Machine Learning,Theano,Sage,我想知道使用SageMath安装Theano库的步骤?只需在终端中运行此命令,即可使用pip安装Theano库 $ sage -pip install theano 下次运行Sage时,theano可用 sage: from theano import * sage: import theano.tensor as T sage: from theano import function sage: x = T.dscalar('x') sage: y = T.dscalar('y') sage

我想知道使用SageMath安装Theano库的步骤?

只需在终端中运行此命令,即可使用pip安装Theano库

$ sage -pip install theano
下次运行Sage时,theano可用

sage: from theano import *
sage: import theano.tensor as T
sage: from theano import function
sage: x = T.dscalar('x')
sage: y = T.dscalar('y')
sage: z = x + y
sage: f = function([x, y], z)
sage: f(2, 3)
array(5.0)
sage: numpy.allclose(f(16.3, 12.1), 28.4)
True
sage: type(x)
<class 'theano.tensor.var.TensorVariable'>
sage:从theano导入*
sage:将theano.tensor导入为T
sage:来自theano导入功能
sage:x=T.dscalar('x')
sage:y=T.dscalar('y')
圣人:z=x+y
sage:f=函数([x,y],z)
圣人:f(2,3)
阵列(5.0)
圣人:努比·奥尔克洛斯(f(16.3,12.1),28.4)
真的
鼠尾草:类型(x)

只需在终端中运行此命令,即可使用pip安装Ano

$ sage -pip install theano
下次运行Sage时,theano可用

sage: from theano import *
sage: import theano.tensor as T
sage: from theano import function
sage: x = T.dscalar('x')
sage: y = T.dscalar('y')
sage: z = x + y
sage: f = function([x, y], z)
sage: f(2, 3)
array(5.0)
sage: numpy.allclose(f(16.3, 12.1), 28.4)
True
sage: type(x)
<class 'theano.tensor.var.TensorVariable'>
sage:从theano导入*
sage:将theano.tensor导入为T
sage:来自theano导入功能
sage:x=T.dscalar('x')
sage:y=T.dscalar('y')
圣人:z=x+y
sage:f=函数([x,y],z)
圣人:f(2,3)
阵列(5.0)
圣人:努比·奥尔克洛斯(f(16.3,12.1),28.4)
真的
鼠尾草:类型(x)