the*_*ith 5 linux machine-learning theano keras
我所要做的就是用keras训练我的人工智能,我从theano那里得到了这个绝对令人讨厌的错误告诉我'CVM' is not defined.我已将错误跟踪到model.fit(input, output)我的keras模型函数.
我看到了指示我的邮件列表,rm -rf ~/.theano但这不起作用.
我重新安装了theano和keras但错误仍然存在.
我测试了训练一个简单的keras网络作为控制(以消除我的代码导致错误的假设),但这里也存在错误.
from keras.models import Sequential
from keras.layers import *
X = np.arange(10)
y = X*10
model = Sequential()
model.add(Dense(1, input_shape=(1,)))
model.compile('sgd', 'mean_squared_error')
# Everything is OK up until here
# when I run
model.fit(X,y)
Run Code Online (Sandbox Code Playgroud)
这是我的完整错误跟踪和错误尾部的要点(来自上面的代码片段):
<home>/.conda/envs/flytrackerML/lib/python2.7/site-packages/theano/gof/vm.pyc in make_vm(self, nodes, thunks, input_storage, output_storage, storage_map, post_thunk_clear, computed, compute_map, updated_vars)
911
912 c0 = sys.getrefcount(node_n_inputs)
--> 913 vm = CVM(
914 nodes,
915 thunks,
NameError: global name 'CVM' is not defined
Run Code Online (Sandbox Code Playgroud)