fast-neural-style icon indicating copy to clipboard operation
fast-neural-style copied to clipboard

hdf5/group.lua:88: attempt to concatenate 'int64_t' and 'string'hdf5/

Open agilebean opened this issue 6 years ago • 1 comments

Hi, after training a model by

python scripts/make_style_dataset.py \```
  --train_dir ~/packs-fns/train \
  --val_dir ~/packs-fns/valid \
  --output_file dataset1.h5

I train the model by

th train.lua \
  -h5_file dataset1.h5 \
  -style_image ~/packs-fns/train/wisegeek.jpg \
  -style_image_size 384 \
  -content_weights 1.0 \
  -style_weights 5.0 \
  -checkpoint_name checkpoint \
  -gpu 0

This throws the following error message I am unable to understand:

/home/rstudio/torch/install/bin/luajit: /home/rstudio/torch/install/share/lua/5.1/hdf5/group.lua:88: attempt to concatenate 'int64_t' and 'string'
stack traceback:
	/home/rstudio/torch/install/share/lua/5.1/hdf5/group.lua:88: in function 'tostring'
	/home/rstudio/torch/install/share/lua/5.1/hdf5/group.lua:39: in function '__init'
	/home/rstudio/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/rstudio/torch/install/share/lua/5.1/torch/init.lua:87>
	[C]: in function 'HDF5Group'
	/home/rstudio/torch/install/share/lua/5.1/hdf5/init.lua:74: in function '_loadObject'
	/home/rstudio/torch/install/share/lua/5.1/hdf5/file.lua:19: in function '__init'
	/home/rstudio/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/rstudio/torch/install/share/lua/5.1/torch/init.lua:87>
	[C]: in function 'open'
	./fast_neural_style/DataLoader.lua:17: in function '__init'
	/home/rstudio/torch/install/share/lua/5.1/torch/init.lua:91: in function </home/rstudio/torch/install/share/lua/5.1/torch/init.lua:87>
	[C]: in function 'DataLoader'
	train.lua:138: in function 'main'

I couldn't find any hint by googling so I'm getting desperate. Any ideas or hints??

agilebean avatar Apr 10 '18 10:04 agilebean

Apply the following change to the hdf5 module: https://github.com/adynathos/torch-hdf5/commit/539fc15ecd25b93f4d0784ea4eb75681329f9714

adynathos avatar Jun 06 '18 13:06 adynathos