-
Notifications
You must be signed in to change notification settings - Fork 15
ConvertWeights Error #4
Description
Hi, I copied your source and ran it in the root directory: python convert_weights.py --cfg configs\swin_tiny_patch4_window7_224.yaml --weights torch_weights\swin_tiny_ patch4_window7_224.pth --weights_type imagenet_1k --output tf_weights .
The error is reported as follows:
**tensorflow.python.framework.errors_impl.UnimplementedError: Exception encountered when calling layer 'conv2d' (type Conv2D).
{{function_node _wrapped__Conv2D_device/job:localhost/replica:0/task:0/device:CPU:0}} The Conv2D op currently only supports the NHWC The Conv2D op currently only supports the NHWC tensor format on the CPU. The op was given the format: NCHW [Op:Conv2D]
Call arguments received by layer 'conv2d' (type Conv2D): inputs=tf.
- inputs=tf.Tensor(shape=(1, 3, 224, 224), dtype=float32)**
I think it has something to do with the Conv2d differences between Torch and TF, but no amount of fine-tuning on my part will fix it.