AliaksandrSiarohin / pose-gan

382 stars 79 forks source link

It seems incompatible problem...... #14

Closed gh18l closed 5 years ago

gh18l commented 5 years ago

I use the latest keras 2.2.2 and contrib, I use test command "python test.py --generator_checkpoint path" in anaconda, but I get the problem "ValueError: You are trying to load a weight file containing 31 layers into a model with 35 layers" in function "load_weights_from_hdf5_group". I degrade keras version to 2.1.6 and download a corresponding-time keras-contrib, but it no works. Is it a version problem? Can you tell me which version is correct or what should I do? Thank you!

The error is `Generate images...

Number of images: 32668

Number of pairs train: 263632

Number of pairs test: 12000

Traceback (most recent call last): File "test.py", line 152, in test()

File "test.py", line 118, in test generator.load_weights(args.generator_checkpoint)

File "/home/lgh/anaconda2/envs/pose-gan/lib/python2.7/site-packages/keras/engine/topology.py", line 2667, in load_weights f, self.layers, reshape=reshape)

File "/home/lgh/anaconda2/envs/pose-gan/lib/python2.7/site-packages/keras/engine/topology.py", line 3365, in load_weights_from_hdf5_group str(len(filtered_layers)) + ' layers.')

ValueError: You are trying to load a weight file containing 31 layers into a model with 35 layers.`

gh18l commented 5 years ago

sorry....I forget some parameters.....