titu1994 / tf_neural_deconvolution

Neural Deconvolutions in Tensorflow
MIT License
12 stars 1 forks source link

h5py error: RuntimeError: Unable to create link (Name already exists) #4

Open ucalyptus opened 4 years ago

ucalyptus commented 4 years ago

This happens when I perform a model.save in h5 format through the default Model API. A possible source of error according to me seems to be https://github.com/tensorflow/hub/issues/287 but I am not able to wrap around on how to solve this issue for FastDeconv2D.

ucalyptus commented 4 years ago

cc: @titu1994

titu1994 commented 4 years ago

Doesn't the hub model required SavedModels instead of H5 models?

ucalyptus2 commented 4 years ago

@titu1994 you are right , but what I mean is all deconv layers are not being uniquely identified thus probably it error occurs when h5py comes across the second deconv layer in the network with the same signature as the first one.

titu1994 commented 4 years ago

You can explicitly pass a name to each layer to fix that. The default and preferred way to save models is with saved model or as TF checkpoint.