ryankiros / neural-storyteller

A recurrent neural network for generating little stories about images
2.96k stars 543 forks source link

Killed (also skip-thoughts) #29

Open itsss opened 6 years ago

itsss commented 6 years ago

Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import generate z = generate.load_all() /home/OOOO/story/files/romance.npz Loading skip-thoughts... Killed

skip-thoughts always sign -> 'Killed'. when i execute skipthoughts example command 'model = skipthoughts.load_model()' this command kills too.

PLEASE HELP.....

cuuupid commented 6 years ago

Killed may be the result of running out of memory/resources. Check resource consumption during run. What are your system specs?

quintendewilde commented 6 years ago

Having this too.. I still not sure if I 'pathed' caffe correctly (in config.py) in my lasagna/theano docker image.

>>> import generate
>>> z = generate.load_all()
models/romance.npz
Loading skip-thoughts...
Killed

Model Name: MacBook Pro Model Identifier: MacBookPro12,1 Processor Name: Intel Core i5 Processor Speed: 2,7 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 3 MB Memory: 8 GB

cuuupid commented 6 years ago

If you try to load the models from the interpreter like so:

>>> import numpy as np
>>> np.load('models/modelname.npz')

Are you able to load the models? If this gets killed it is likely because you do not have the memory necessary for numpy to load the entirety of the npz archive. This is a possibility as it uses almost 12GB RAM on my 16GB machine. Since a numpy archive is likely the best way to load the parameters, I'm not sure this can be improved much either. You may be able to load the parameters piece by piece and delete old variables to free up memory (e.g. old_var = None).

As far as the docker image, I haven't used it before but this particular issue is likely to do with loading the models into memory, as misconfiguring Pycaffe leads to a more verbose error.