Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练一直会有错误。请求指导? #18

Closed
yinminggang opened this issue Jul 26, 2017 · 2 comments
Closed

训练一直会有错误。请求指导? #18

yinminggang opened this issue Jul 26, 2017 · 2 comments

Comments

@yinminggang
Copy link

17 cost: 0.267990171909
18 cost: 0.298284947872
19 cost: 0.266352206469
Traceback (most recent call last):
File 'E:/ymg/NSC-LA/main/train.py', line 27, in
model.train(30)
File 'E:\ymg\NSC-LA \main\LSTMModel.py', line 87, in train
out = self.train_model(self.trainset.docs[i], self.trainset.label[i], self.trainset.wordmask[i], self.trainset.sentencemask[i], self.trainset.maxsentencenum[i])
File 'D:\Anaconda2\lib\site-packages heano\compile unction_module.py', line 898, in call
storage_map=getattr(self.fn, 'storage_map', None))
File 'D:\Anaconda2\lib\site-packages heano\gof\link.py', line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File 'D:\Anaconda2\lib\site-packages heano\compile unction_module.py', line 884, in call
self.fn() if output_subset is None else
File 'D:\Anaconda2\lib\site-packages heano\scan_module\scan_op.py', line 989, in rval
r = p(n, [x[0] for x in i], o)
File 'D:\Anaconda2\lib\site-packages heano\scan_module\scan_op.py', line 978, in p
self, node)
File 'theano/scan_module/scan_perform.pyx', line 522, in theano.scan_module.scan_perform.perform (C:\Users\Administrator\AppData\Local\Theano\compiledir_Windows-7-6.1.7601-SP1-Intel64_Family_6_Model_94_Stepping_3_GenuineIntel-2.7.12-64\scan_perform\mod.cpp:6173)
RuntimeError: CudaNdarray_ZEROS: allocation failed.
Apply node that caused the error: forall_inplace,gpu,grad_of_scan_fn}(Elemwise{minimum,no_inplace}.0, GpuDimShuffle{0,2,1}.0, GpuDimShuffle{0,2,1}.0, GpuElemwise{tanh,no_inplace}.0, GpuDimShuffle{0,1,x}.0, GpuElemwise{Composite{(i0 - sqr(i1))},no_inplace}.0, GpuSubtensor{int64:int64:int64}.0, GpuSubtensor{int64:int64:int64}.0, GpuSubtensor{int64:int64:int64}.0, GpuAlloc{memset_0=True}.0, GpuSubtensor{::int64}.0, GpuAlloc{memset_0=True}.0, GpuAlloc{memset_0=True}.0, GpuAlloc{memset_0=True}.0, GpuAlloc{memset_0=True}.0, Elemwise{minimum,no_inplace}.0, Elemwise{minimum,no_inplace}.0, Elemwise{minimum,no_inplace}.0, Elemwise{minimum,no_inplace}.0, Elemwise{minimum,no_inplace}.0, Wf1, Wf2, Wc1, Wc2, Wi1, Wi2, Wo1, Wo2, GpuDimShuffle{x,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{x,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{x,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{x,0}.0, GpuDimShuffle{1,0}.0, GpuDimShuffle{1,0}.0)
Toposort index: 879
Inputs types: [TensorType(int64, scalar), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, (False, False, True)), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, 3D), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, row), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, row), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, row), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, row), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix)]
Inputs shapes: [(), (106, 200, 6016), (106, 200, 6016), (106, 6016, 200), (106, 6016, 1), (106, 6016, 200), (106, 6016, 200), (106, 6016, 200), (106, 6016, 200), (107, 6016, 200), (107, 6016, 200), (2, 200), (2, 200), (2, 200), (2, 200), (), (), (), (), (), (200, 200), (200, 200), (200, 200), (200, 200), (200, 200), (200, 200), (200, 200), (200, 200), (1, 200), (200, 200), (200, 200), (1, 200), (200, 200), (200, 200), (1, 200), (200, 200), (200, 200), (1, 200), (200, 200), (200, 200)]
Inputs strides: [(), (-1203200, 1, 200), (-1203200, 1, 200), (1203200, 200, 1), (-6016, 1, 0), (1203200, 200, 1), (-1203200, 200, 1), (-1203200, 200, 1), (-1203200, 200, 1), (1203200, 200, 1), (-1203200, 200, 1), (200, 1), (200, 1), (200, 1), (200, 1), (), (), (), (), (), (200, 1), (200, 1), (200, 1), (200, 1), (200, 1), (200, 1), (200, 1), (200, 1), (0, 1), (1, 200), (1, 200), (0, 1), (1, 200), (1, 200), (0, 1), (1, 200), (1, 200), (0, 1), (1, 200), (1, 200)]
Inputs values: [array(106L, dtype=int64), 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', array(106L, dtype=int64), array(106L, dtype=int64), array(106L, dtype=int64), array(106L, dtype=int64), array(106L, dtype=int64), 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown']
Outputs clients: [[], [], [GpuSubtensor{int64}(forall_inplace,gpu,grad_of_scan_fn}.2, ScalarFromTensor.0)], [GpuSubtensor{int64}(forall_inplace,gpu,grad_of_scan_fn}.3, ScalarFromTensor.0)], [GpuSubtensor{int64}(forall_inplace,gpu,grad_of_scan_fn}.4, ScalarFromTensor.0)], [GpuSubtensor{int64}(forall_inplace,gpu,grad_of_scan_fn}.5, ScalarFromTensor.0)], [GpuSubtensor{::int64}(forall_inplace,gpu,grad_of_scan_fn}.6, Constant{-1})], [GpuReshape{2}(forall_inplace,gpu,grad_of_scan_fn}.7, MakeVector{dtype='int64'}.0)], [GpuReshape{2}(forall_inplace,gpu,grad_of_scan_fn}.8, MakeVector{dtype='int64'}.0)], [GpuReshape{2}(forall_inplace,gpu,grad_of_scan_fn}.9, MakeVector{dtype='int64'}.0)], [GpuReshape{2}(forall_inplace,gpu,grad_of_scan_fn}.10, MakeVector{dtype='int64'}.0)]]

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

训练一直会出现这样的错误,迭代了有0~7次不等,就会这样,使用的8GB Gpu,也上网找了 使用FAST_RUN模式训练,同样的出错。。。。求哪位大神来共勉????

@cheng-Ye
Copy link

你用的库都是哪些版本啊?

@huimchen
Copy link
Member

由于Theano已经停止更新,本issue将关闭,欢迎使用其他深度学习框架实现!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants