Я новичок в theano и следую этому простому вводному упражнению в theano, которое можно найти здесь: http://deeplearning.net/software/theano/introduction.html#introduction
Идея состоит в том, чтобы просто объявить некоторые тензорные переменные и обернуть их в функцию, это самая простая вещь, которую вы могли бы сделать с помощью theano.
точный код:
import theano
from theano import tensor
# declare two symbolic floating-point scalars
a = tensor.dscalar()
b = tensor.dscalar()
# create a simple expression
c = a + b
# convert the expression into a callable object that takes (a,b)
# values as input and computes a value for c
f = theano.function([a,b], c)
# bind 1.5 to 'a', 2.5 to 'b', and evaluate 'c'
assert 4.0 == f(1.5, 2.5)
Однако я получаю эту трассировку:
Traceback (most recent call last):
File "test.py", line 13, in <module>
f = theano.function([a,b], c)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/compile/function.py", line 223, in function
profile=profile)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/compile/pfunc.py", line 512, in pfunc
on_unused_input=on_unused_input)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/compile/function_module.py", line 1312, in orig_function
defaults)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/compile/function_module.py", line 1181, in create
_fn, _i, _o = self.linker.make_thunk(input_storage=input_storage_lists)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/link.py", line 434, in make_thunk
output_storage=output_storage)[:3]
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/vm.py", line 847, in make_all
no_recycling))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/op.py", line 606, in make_thunk
output_storage=node_output_storage)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cc.py", line 948, in make_thunk
keep_lock=keep_lock)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cc.py", line 891, in __compile__
keep_lock=keep_lock)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cc.py", line 1314, in cthunk_factory
key = self.cmodule_key()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cc.py", line 1032, in cmodule_key
c_compiler=self.c_compiler(),
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cc.py", line 1090, in cmodule_key_
sig.append('md5:' + theano.configparser.get_config_md5())
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/configparser.py", line 146, in get_config_md5
['%s = %s' % (cv.fullname, cv.__get__()) for cv in all_opts]))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/configparser.py", line 146, in <listcomp>
['%s = %s' % (cv.fullname, cv.__get__()) for cv in all_opts]))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/configparser.py", line 273, in __get__
val_str = self.default()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/tensor/blas.py", line 282, in default_blas_ldflags
if GCC_compiler.try_flags(["-lblas"]):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cmodule.py", line 1852, in try_flags
flags=flag_list, try_run=False)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/theano/gof/cmodule.py", line 1799, in try_compile_tmp
os.write(fd, src_code)
TypeError: ('The following error happened while compiling the node', Elemwise{add,no_inplace}(<TensorType(float64, scalar)>, <TensorType(float64, scalar)>), '\n', "'str' does not support the buffer interface")
Моя единственная мысль заключается в том, что это может быть связано с python3, но это не должно быть так. Пожалуйста помоги.