neuraltalk2
neuraltalk2 copied to clipboard
Net doesn't seem to train on my own data
I'm running train.lua
as so
th train.lua -checkpoint_path "checkpoint" -cnn_model "model/VGG_ILSVRC_16_layers.caffemodel" -max_iters 10000 -seq_per_img 3 -input_h5 coco/output.h5 -input_json coco/output.json -save_checkpoint_every 100 -gpuid -1
However even after a 1000 iterations all the images seem to output the same caption no matter what I throw at it.
In the validation set I noticed that it says
image nil: What is the man holding?
is image nil
expected behaviour or should it be an ID?
I am also getting this problem. Did you ever resolve it?
@cjds I'm not sure if you wanted an update or not but I was able to resolve this. Note that I'm running OSX and if you are on a different platform it may not resolve it for you.
The instructions for installing torch as provided by @karpathy in the readme, i.e:
$ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
$ git clone https://github.com/torch/distro.git ~/torch --recursive
$ cd ~/torch;
$ ./install.sh # and enter "yes" at the end to modify your bashrc
$ source ~/.bashrc
Are now outdated (https://github.com/torch/ezinstall/).
The recommended way of installing torch (as instructed by this link http://torch.ch/docs/getting-started.html) provides these instructions:
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
Previously when training for 100,000 or more iterations the eval script would assign every image the same caption, I was also unable to load the pretrained model for CPU. After uninstalling the old torch version and reinstalling using the new steps I was not only able to load the pretrained CPU model but also train on my own captions. When I evaluate the model I get somewhat sensible results, rather than the exact same caption for each image.
I'm not sure why this version changes anything but hey it worked for me.
If anyone else has any similar problems, here is the installation script I use to get everything up and running: https://github.com/hscells/lifelog-caption/blob/master/install.sh