2016-11-22 2 views

ответ

0

Просто установите theano, используя pip, запустив это в терминале.

$ 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'> 
+0

Большое спасибо проф. Самуэль Лельевр –