serhii-havrylov / ShowAndTell

11 stars 5 forks source link

what's caption_generation_model.model_blocks #3

Open SeekPoint opened 8 years ago

SeekPoint commented 8 years ago

envy@ub1404:/media/envy/data1t/os_prj/github/ShowAndTell$ python caption_generation_model/train.py Using gpu device 0: GeForce GTX 950M (CNMeM is disabled, CuDNN 4007) Traceback (most recent call last): File "caption_generation_model/train.py", line 10, in from caption_generation_model.model_blocks import nonlinearities ImportError: No module named caption_generation_model.model_blocks envy@ub1404:/media/envy/data1t/os_prj/github/ShowAndTell$

serhii-havrylov commented 8 years ago

It is python module It seems you have to add ShowAndTell folder to PYTHONPATH env variable.

SeekPoint commented 8 years ago

envy@ub1404:/media/envy/data1t/os_prj/github/ShowAndTell$ PYTHONPATH=/media/envy/data1t/os_prj/github/ShowAndTell python caption_generation_model/train.py Using gpu device 0: GeForce GTX 950M (CNMeM is disabled, CuDNN 4007) Traceback (most recent call last): File "caption_generation_model/train.py", line 174, in ls.append(train_model(cnnf_idx, c_begin, c_end)) File "/home/envy/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 871, in call storage_map=getattr(self.fn, 'storage_map', None)) File "/home/envy/.local/lib/python2.7/site-packages/theano/gof/link.py", line 314, in raise_with_op reraise(exc_type, exc_value, exc_trace) File "/home/envy/.local/lib/python2.7/site-packages/theano/compile/function_module.py", line 859, in call outputs = self.fn() ValueError: dimension mismatch in args to gemv (1024,4096)x(1000)->(1024) Apply node that caused the error: GpuGemv{inplace}(GpuAllocEmpty.0, TensorConstant{1.0}, GpuDimShuffle{1,0}.0, GpuSubtensor{int32}.0, TensorConstant{0.0}) Toposort index: 33 Inputs types: [CudaNdarrayType(float32, vector), TensorType(float32, scalar), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, vector), TensorType(float32, scalar)] Inputs shapes: [(1024,), (), (1024, 4096), (1000,), ()] Inputs strides: [(1,), (), (1, 1024), (1,), ()] Inputs values: ['not shown', array(1.0, dtype=float32), 'not shown', 'not shown', array(0.0, dtype=float32)] Outputs clients: [[GpuDimShuffle{x,0}(GpuGemv{inplace}.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. envy@ub1404:/media/envy/data1t/os_prj/github/ShowAndTell$