-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
ops.image.affine_transform() does not work as a layer in GPU #20191
Comments
Just adding extra info.
You could also try Edit: |
Can you try JAX? I'd like to see if this is an XLA issue or a TF issue. |
Done several tests (gist), I'll try to summarise below @fchollet :
--> 365 transform = torch.reshape(transform, (batch_size, 3, 3))
366 offset = transform[:, 0:2, 2].clone()
367 offset = torch.nn.functional.pad(offset, pad=[0, 1, 0, 0])
RuntimeError: shape '[10000, 3, 3]' is invalid for input of size 9
Same error than TORCH GPU for both CPU & GPU (see observation below.) Using Torch GPU returns |
For that one, you can simply cast your input to float32 (you can cast it back to int afterwards if you need ints)
What is the JAX error message? I don't understand the PyTorch error message (as is often the case with those). |
should that be done automatically within the layer?
The line ( in this case just seems misuse of the fn since it takes a Error one (line and screenshot)yp = model.predict_step(x) Error two (line and screenshot)And commenting that one out, the next error at Last error seems == to Torch's, just (note that im not OP just reading out of curiosity.) |
Hi,
I notice ops.image.affine_transform() does not work as part of a model in GPU
TF version: 2.16.1
keras version: 3.5.0
Some observations from some testing
Samples code as below
The text was updated successfully, but these errors were encountered: