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

Bug in spatial_transformer_network's code #156

Open
AyushSharma2000 opened this issue Aug 5, 2021 · 2 comments
Open

Bug in spatial_transformer_network's code #156

AyushSharma2000 opened this issue Aug 5, 2021 · 2 comments

Comments

@AyushSharma2000
Copy link

Screenshot 2021-08-05 at 11 01 42 PM
Screenshot 2021-08-05 at 11 08 40 PM

Environment:

Google Colaboratory.
Tensorflow version 2.5.0
Keras version 2.4.x

Tried running the train.py file in examples/Spatial_Transformer_Networks/ and received an error on passing the MNIST dataset present in the STN repository. No changes were made to the code other than changing the file path.

The second screenshot shows the remaining portion of the last line of error present in the first screenshot.

@zjhJOJO
Copy link

zjhJOJO commented Aug 13, 2022

i met the same bug, can anyone helpful offer a solution?

@Ataei67
Copy link

Ataei67 commented Apr 17, 2024

change the compute_output_shape function in layer.py file to this solved my problem.
def compute_output_shape(self, input_shapes): height, width = self.output_size num_channels = input_shapes[0][-1] return tf.constant([1, height, width, num_channels])

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

3 participants