今天运行theano程序的时候,遇到了下面的问题:
GRU4Rec git:(master) ✗ python run_rsc15.pyUsing cuDNN version 6021 on context NoneMapped name None to device cuda: GeForce GTX 1080 Ti (0000:03:00.0)start trainingepoch: 0Traceback (most recent call last): File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in __call__ self.fn() if output_subset is None elseIndexError: Index out of bounds.During handling of the above exception, another exception occurred:Traceback (most recent call last): File "run_rsc15.py", line 35, in <module> gru.fit(data) File "/home/eric/Documents/Experiments/GRU4Rec/gru4rec.py", line 575, in fit cost = train_function(in_idx, y, len(iters), reset) File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/compile/function_module.py", line 917, in __call__ storage_map=getattr(self.fn, 'storage_map', None)) File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op reraise(exc_type, exc_value, exc_trace) File "/home/eric/anaconda3/lib/python3.6/site-packages/six.py", line 692, in reraise raise value.with_traceback(tb) File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in __call__ self.fn() if output_subset is None elseIndexError: Index out of bounds.Apply node that caused the error: GpuAdvancedSubtensor1(<GpuArrayType<None>(float32, matrix)>, GpuContiguous.0)Toposort index: 29Inputs types: [GpuArrayType<None>(float32, matrix), GpuArrayType<None>(int64, vector)]Inputs shapes: [(68892, 100), (2080,)]Inputs strides: [(400, 4), (8,)]Inputs values: ['not shown', 'not shown']Outputs clients: [[GpuElemwise{Composite{((i0 * i1) - (i2 * (i3 / sqrt((i4 + i5 + i6)))))}}[(0, 1)]<gpuarray>(GpuArrayConstant{[[0.3]]}, GpuAdvancedSubtensor1.0, GpuArrayConstant{[[0.05]]}, GpuDot22.0, GpuArrayConstant{[[1.e-06]]}, GpuAdvancedSubtensor1.0, GpuElemwise{sqr,no_inplace}.0)]]Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer): File "run_rsc15.py", line 35, in <module> gru.fit(data) File "/home/eric/Documents/Experiments/GRU4Rec/gru4rec.py", line 532, in fit updates = self.RMSprop(cost, params, full_params, sparams, sidxs) File "/home/eric/Documents/Experiments/GRU4Rec/gru4rec.py", line 408, in RMSprop vs = velocity[sample_idx] File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/gpuarray/type.py", line 675, in __getitem__ return _operators.__getitem__(self, *args) File "run_rsc15.py", line 35, in <module> gru.fit(data) File "/home/eric/Documents/Experiments/GRU4Rec/gru4rec.py", line 532, in fit updates = self.RMSprop(cost, params, full_params, sparams, sidxs) File "/home/eric/Documents/Experiments/GRU4Rec/gru4rec.py", line 408, in RMSprop vs = velocity[sample_idx] File "/home/eric/anaconda3/lib/python3.6/site-packages/theano/gpuarray/type.py", line 675, in __getitem__ return _operators.__getitem__(self, *args)HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.我开始的theano的版本为:
Theano 1.0.2+2.gc449c8699然后我把版本降低到0.9之后,就运行正常了:
conda install theano=0.9程序正常跑起来的日志:
GRU4Rec git:(master) ✗ python run_rsc15.py/home/eric/anaconda3/lib/python3.6/site-packages/theano/gpuarray/dnn.py:135: UserWarning: Your cuDNN version is more recent than Theano. If you encounter problems, try updating Theano or downgrading cuDNN to version 5.1. warnings.warn("Your cuDNN version is more recent than "Using cuDNN version 6021 on context NoneMapped name None to device cuda: GeForce GTX 1080 Ti (0000:03:00.0)start trainingepoch: 0Epoch0loss: 0.515304epoch: 1Epoch1loss: 0.356552epoch: 2Epoch2loss: 0.273438epoch: 3Epoch3loss: 0.232888epoch: 4Epoch4loss: 0.211045epoch: 5Epoch5loss: 0.198076epoch: 6Epoch6loss: 0.189473epoch: 7Epoch7loss: 0.183521epoch: 8Epoch8loss: 0.179129epoch: 9Epoch9loss: 0.175793epoch: 10Epoch10loss: 0.173115epoch: 11Epoch11loss: 0.170898epoch: 12Epoch12loss: 0.169162