0
如果我有这样的事情:使用两个theano功能结合在一起
import theano.tensor as T
from theano import function
a = T.dscalar('a')
b = T.dscalar('b')
first_func = a * b
second_func = a - b
first = function([a, b], first_func)
second = function([a, b], second_func)
,我想创建第三个功能是first_func(1,2) + second_func(3,4)
,是有办法做到这一点,创建一个通过这两个小的功能作为输入?
我想要做的事,如:
third_func = first(a, b) + second(a,b)
third = function([a, b], third_func)
但这不起作用。将我的功能分解为更小的功能的正确方法是什么?