Skip to content
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

custom training using pre trained weights watermark_rem_weights.h5 #10

Open
mayankpathaklumiq opened this issue Apr 29, 2021 · 3 comments

Comments

@mayankpathaklumiq
Copy link

Traceback (most recent call last):
File "train.py", line 303, in
generator.load_weights("weights_org/watermark_rem_weights.h5")
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 250, in load_weights
return super(Model, self).load_weights(filepath, by_name, skip_mismatch)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1266, in load_weights
hdf5_format.load_weights_from_hdf5_group(f, self.layers)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 707, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 3384, in batch_set_value
x.assign(np.asarray(value, dtype=dtype(x)))
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 846, in assign
self._shape.assert_is_compatible_with(value_tensor.shape)
File "/home/ubuntu/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 1117, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, 3, 256, 512) and (256, 256, 3, 3) are incompatible

@Ashwani-Dangwal
Copy link

Hey @mayankpathaklumiq, were you able to solve this issue?

@mayankpathaklumiq
Copy link
Author

Hey @mayankpathaklumiq, were you able to solve this issue?

yes

@Ashwani-Dangwal
Copy link

@mayankpathaklumiq , Did you trained the model using the code provided here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants