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

ValueError: axes don't match array when loading WDSR pre-trained weights #92

Open
adavradou opened this issue Dec 11, 2021 · 0 comments

Comments

@adavradou
Copy link

Hello everyone.

I managed to test EDSR and SRGAN on a custom dataset with the pre-trained weights with no problem.

However, I when I load the WDSR weights, I get the error:
ValueError: axes don't match array

I don't know if it is related, but, I was getting the following error, when calling the wdsr_b model:
`~/.pyenv/versions/3.6.8/envs/srgan/lib/python3.6/site-packages/keras/layers/wrappers.py in init(self, layer, **kwargs)
44
45 def init(self, layer, **kwargs):
---> 46 assert isinstance(layer, Layer)
47 self.layer = layer
48 super(Wrapper, self).init(**kwargs)

AssertionError:`

Thus, I changed conv2d_weightnorm function (as mentioned in https://www.reddit.com/r/tensorflow/comments/dn0hjv/applying_weight_normalization_layer_in_tf_2/ in the following way:

def conv2d_weightnorm(filters, kernel_size, padding='same', activation=None, **kwargs): return Conv2D(filters, kernel_size, padding=padding, activation=activation, **kwargs)

Does anyone have an idea what I am doing wrong?

Thank you in advance!

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

1 participant