Open walidar opened 8 years ago
@walidar could you say more about the packages on your system (Theano, Keras, CUDA, etc.) and which dataset you're trying to run this on?
@elliottd I am using flickr30k dataset I am using CUDA 6.5 and Python 2.7 with the following packages:
cython 0.24
pip 8.1.1 py27_1
python 2.7.11 0
pyyaml 3.11
scipy 0.17.0
six 1.10.0
theano 0.8.2
wheel 0.29.0 py27_0
zlib 1.2.8 0
@walidar I think I see the problem. The master
branch of the code only supports Keras 0.1.3 and you are using Keras 1.0.1. A lot has changed in Keras since we wrote the original code.
The code in the experimental_datagen
branch supports Keras 0.3.3 but it is still experimental.
If you use pip install -r requirements.txt
to install the dependencies then you should be able to use the code.
Thank you @elliottd for your fast reply ..
I installed the correct versions from requirments but I still got the same error:
INFO:Callbacks:Initialising with the first 1 gold words (incl BOS)
Traceback (most recent call last):
File "/lium/buster1/aransa/workspace/GroundedTranslation/train.py", line 282, in
before that there is a warning: INFO:models:... visual: adding image features as input features /lium/buster1/aransa/miniconda2/envs/mlm_env/lib/python2.7/site-packages/theano/gof/cmodule.py:293: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility rval = import(module_name, {}, {}, [module_name]) INFO:data_generator:Generating training data batch
@walidar hmm, now I am confused.
The error message is telling you that generate_sentences()
in Callbacks.py
is trying to generate descriptions for longer than the maximum --generation_timesteps
in the datastructure (axis 1).
Could you share the command line arguments you're using to run train.py
?
I got the following error, any help what is the problem? I am using the latest code ..
INFO:Callbacks:Initialising with the first 1 gold words (incl BOS) Traceback (most recent call last): File "/lium/buster1/aransa/workspace/GroundedTranslation/train.py", line 282, in
model.train_model()
File "/lium/buster1/aransa/workspace/GroundedTranslation/train.py", line 134, in train_model
shuffle=True)
File "/lium/buster1/aransa/miniconda2/envs/mlm_env/lib/python2.7/site-packages/keras/models.py", line 402, in fit
sample_weight=sample_weight)
File "/lium/buster1/aransa/miniconda2/envs/mlm_env/lib/python2.7/site-packages/keras/engine/training.py", line 1036, in fit
callback_metrics=callback_metrics)
File "/lium/buster1/aransa/miniconda2/envs/mlm_env/lib/python2.7/site-packages/keras/engine/training.py", line 795, in _fit_loop
callbacks.on_epoch_end(epoch, epoch_logs)
File "/lium/buster1/aransa/miniconda2/envs/mlm_env/lib/python2.7/site-packages/keras/callbacks.py", line 39, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "/lium/buster1/aransa/workspace/GroundedTranslation/Callbacks.py", line 97, in on_epoch_end
self.generate_sentences(path)
File "/lium/buster1/aransa/workspace/GroundedTranslation/Callbacks.py", line 373, in generate_sentences
arrays[0][i, t, next_word_indices[i]] = 1.
IndexError: index 42 is out of bounds for axis 1 with size 42