BUPTLdy / Sentiment-Analysis

Chinese Shopping Reviews sentiment analysis
http://buptldy.github.io/2016/07/20/2016-07-20-sentiment%20analysis/
351 stars 168 forks source link

使用LSTM模型做情感分类报错了 #2

Closed chenjun0210 closed 7 years ago

chenjun0210 commented 7 years ago

hi,你好 我跑你的demo时,报错了,不知道怎么弄。 报错信息如下: AssertionError: Can't store in size_t for the bytes requested 50 * 4 Apply node that caused the error: GpuAllocEmpty(Elemwise{Composite{(Switch(LT(maximum(i0, i1), i2), (maximum(i0, i1) + i3), (maximum(i0, i1) - i3)) + i3)}}.0, Elemwise{Composite{((((i0 * Switch(EQ(i1, i2), i3, i1) * Switch(EQ(i4, i2), i3, i4)) // i5) * i6) // i7)}}[(0, 0)].0, TensorConstant{50}) Toposort index: 63 Inputs types: [TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar)] Inputs shapes: [(), (), ()] Inputs strides: [(), (), ()] Inputs values: [array(100), array(-42), array(50)] Outputs clients: [[GpuIncSubtensor{InplaceSet;:int64:}(GpuAllocEmpty.0, GpuFromHost.0, Constant{1})]]

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.

BUPTLdy commented 7 years ago

你试试更新下keras的版本 sudo pip install git+git://github.com/fchollet/keras.git --upgrade