UnimplementedError: The Conv2D op currently does not support grouped convolutions on the CPU.
See original GitHub issueInfo
Coalb TPU v2
Kaggle TPU v3
TensorFlow: 2.4.1
Transformer: 4.22.0.dev0
Who can help?
@Rocketknight1 @NielsRogge @sgugger @amyeroberts
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examples
folder (such as GLUE/SQuAD, …) - My own task or dataset (give details below)
Reproduction
Please, get the file form HERE. A notebook scripts, just plug-n-play.
What to do
- Run the script in Colab with TPU.
- Run the script in Kaggle with TPU.
You may not need to change anything, just through the file to these platform and run all.
Expected behavior
What was I doing
With the given script above, I was trying to run a vision transformer model on Kaggle TPU (with TF 2.4.1 by default). And I got
2 prime_input = tf.keras.Input(shape=(*IMAGE_SIZE, 3))
3 mode_inputs = tf.keras.layers.Permute(dims=(3, 1, 2))(prime_input)
----> 4 backbone = TFConvNextModel.from_pretrained("facebook/convnext-tiny-224")
5 backbone.trainable = False
....
171 def call(self, hidden_states, training=False):
172 input = hidden_states
--> 173 x = self.dwconv(hidden_states)
174 x = self.layernorm(x)
175 x = self.pwconv1(x)
UnimplementedError: The Conv2D op currently does not support grouped convolutions on the CPU. A grouped convolution was attempted to be run because the input depth of 96 does not match the filter input depth of 1
A known tf issue, discussed also here. But this issue didn’t appear when I ran the same script on Colab TPU (with tf 2.4.1
) system. The model build successfully.
As I am currently using transformer on kaggle platform, I need to make it work. The given script above is just about model construction code. Any pointer what’s going on here?
Please note again, Kaggle TPU v3 and Colab TPU v2. Not sure if it’s something to do with this.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Hi @innat – as I’ve mentioned above this is an issue for the Kaggle and/or the TensorFlow team, there is nothing the
transformers
team can do.We don’t have the power to go back in time and add code to a repository that isn’t ours, nor to update Kaggle’s TPU runtimes.