You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
If you post your question on Stack Overflow, please explain:
What you were trying to do (and why)
I am trying to create a VAE-GAN where the BatchNormalization layers of the Discriminator are not shared between the Real and Fake images since the batch statistics would get mislead.
What happened (include command output)
If I try to give to tf.cond's true_fn and false_fn arguments a BNLayer which is callable I get the following error: "TypeError: layer_op() missing 2 required positional arguments: 'inputs' and 'is_training'" which is actually correct since tf.cond states that the return should be "Tensors returned by the call to either true_fn or false_fn. If the callables return a singleton list, the element is extracted from the list." which means that all parameters for the callable part of the function should be passed at the creation of the layer which is not the case in NiftyNet since the creation and calling of the layer are being splint in two.
What you expected to happen
I would expect that tf.cond to work with BNLayer. But the required syntax would be something similar to this:
If you post your question on Stack Overflow, please explain:
What you were trying to do (and why)
I am trying to create a VAE-GAN where the BatchNormalization layers of the Discriminator are not shared between the Real and Fake images since the batch statistics would get mislead.
What happened (include command output)
If I try to give to tf.cond's true_fn and false_fn arguments a BNLayer which is callable I get the following error: "TypeError: layer_op() missing 2 required positional arguments: 'inputs' and 'is_training'" which is actually correct since tf.cond states that the return should be "Tensors returned by the call to either true_fn or false_fn. If the callables return a singleton list, the element is extracted from the list." which means that all parameters for the callable part of the function should be passed at the creation of the layer which is not the case in NiftyNet since the creation and calling of the layer are being splint in two.
What you expected to happen
I would expect that tf.cond to work with BNLayer. But the required syntax would be something similar to this:
Any of the following will throw an error
Expected error:
TypeError: layer_op() missing 2 required positional arguments: 'inputs' and 'is_training'
Expected error:
TypeError: true_fn must be callable.
The text was updated successfully, but these errors were encountered: