-
Notifications
You must be signed in to change notification settings - Fork 0
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
AffineCouplingLayer breaks under some shapes #1
Comments
Good question. In brevity, not necessarily, however, I think it would be preferable. I'll update it after I finish cleaning up the variational dequantization code later today. I might add a strategy class that allow different ways of choosing The full answer. In Glow the split is done channel-wise. AffineCoupling layer takes an argument The outputs I think I was experimenting with a few different ways of doing it, which yielded the code you saw. Currently, I'm actually thinking of delegating this responsibility to another strategy class. The main argument for this: It is not clear to me which way of splitting the output of the NN into Surprisingly, I could not reproduce the bug, the code below works for me. Does the following work for you?
|
The code still doesn't work. |
I changed the code to reflect the strategy of glow. They take odd/even channels instead of splitting halfway. I'll refactor later to allow both strategies.
The code below works on my pc with tf2.0.0beta (gpu variant) and python3.7.3.
|
In the call_ function of the affine coupling layer
`
def call_(self, X):
Shouldn't s and t be
X[:,:,:,c:]
andX[:,:,:,:c]
respectively?My code-
Gives the error
in call_ s = tf.reshape(s, in_shape) tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 96 values, but the requested shape has 72
The text was updated successfully, but these errors were encountered: