-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with the model_500k.h5 #58
Comments
+1 to @clin366 . I have literally the same issue and would greatly appreciate advice of the developer on this. |
I am able to load the weights without issue, after freshly downloading both the smiles_500 and model_500 h5 files. Can you do me a favor, and run the following:
|
@pechersky hi, thanks! I ran the codes and the result is:
In fact, after preprocess step, I used H5VIEW to check the charset length, which seems all right ( 0~55, 0 for blank and 55 for "u"). I'm not sure where the mistake is from. However, I'm running the project on Mac Pro and using the tensor flow( CPU version), maybe this causes some problem? |
hi~ I have solved this issue by running this project on ubuntu system with tensorflow-gpu. In my understanding, the first line is the input chemical sequence, I'm not sure what the second line represent... It seems strange for me... |
I think it's the output. It looks like a garbage output, but it does consist of character set. You can look the issue I invoke in #54 |
I am getting a similar error, would someone comment on this, i am using tensorflow-gpu on linux, I have experimented with different versions but still am getting the error: Traceback (most recent call last): |
As far as I can tell, the model_500k.h5 that is in the data is older than the current preprocess code. I'd suggest trying |
Same error almost python sample_gen.py data/smiles_50k.h5 data/model_500k.h5 --target autoencoder |
I'm having the same problem as @zalperst. Please help! Thank you! ValueError: Dimension 1 in both shapes must be equal, but are 56 and 54 for 'Assign' (op: 'Assign') with input shapes: [9,56,9], [9,54,9]. |
In order to test the model_500k.h5 in the data folder.
I ran the scripts as below:
python2.7 preprocess.py data/smiles_500k.h5 data/processed_500.h5;
python2.7 sample.py data/processed_500.h5 data/model_500k.h5 --target autoencoder
however, the second step provides me with error message as following:
main()
File "sample.py", line 90, in main
autoencoder(args, model)
File "sample.py", line 44, in autoencoder
model.load(charset, args.model, latent_rep_size = latent_dim)
File "/Users/flynn/Documents/desktop/GT_second_semester/song_lab/nanoparticle_research/molecule_BO/keras_molecule/keras-molecules/molecules/model.py", line 95, in load
self.create(charset, weights_file = weights_file, latent_rep_size = latent_rep_size)
File "/Users/flynn/Documents/desktop/GT_second_semester/song_lab/nanoparticle_research/molecule_BO/keras_molecule/keras-molecules/molecules/model.py", line 50, in create
self.autoencoder.load_weights(weights_file)
File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 2500, in load_weights
self.load_weights_from_hdf5_group(f)
File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 2585, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "/usr/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 990, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 575, in assign
return state_ops.assign(self._variable, value, use_locking=use_locking)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_state_ops.py", line 47, in assign
use_locking=use_locking, name=name)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2242, in create_op
set_shapes_for_outputs(ret)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1617, in set_shapes_for_outputs
shapes = shape_func(op)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1568, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 675, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimension 2 in both shapes must be equal, but are 56 and 55 for 'Assign' (op: 'Assign') with input shapes: [9,1,56,9], [9,1,55,9].
Is this model_500k.h5 not proper for smiles_500k.h5? If so, how could I make use of model_500k.h5?
The text was updated successfully, but these errors were encountered: