@isaacgerg can you have a look if your error persists on this branch? I couldn't reproduce it yet.
Would also be helpful if you could provide installed package versions.
2023-02-04 13:29:39.848515: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
inputs: image_resolution=224 context_length=77
2023-02-04 13:29:47.512499: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:From /Users/robert/Documents/GitHub/CLIP-tf2/venv/lib/python3.9/site-packages/tensorflow/python/autograph/pyct/static_analysis/liveness.py:83: Analyzer.lamba_check (from tensorflow.python.autograph.pyct.static_analysis.liveness) is deprecated and will be removed after 2023-09-23.
Instructions for updating:
Lambda fuctions will be no more assumed to be used in the statement where they are used, or at least in the same block. https://github.com/tensorflow/tensorflow/issues/56089
W0204 13:29:48.306251 140704307972288 deprecation.py:350] From /Users/robert/Documents/GitHub/CLIP-tf2/venv/lib/python3.9/site-packages/tensorflow/python/autograph/pyct/static_analysis/liveness.py:83: Analyzer.lamba_check (from tensorflow.python.autograph.pyct.static_analysis.liveness) is deprecated and will be removed after 2023-09-23.
Instructions for updating:
Lambda fuctions will be no more assumed to be used in the statement where they are used, or at least in the same block. https://github.com/tensorflow/tensorflow/issues/56089
1/1 [==============================] - 9s 9s/step
Copying weights: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 482/482 [00:01<00:00, 418.74it/s]
1/1 [==============================] - 0s 251ms/step
Classify image: https://github.com/openai/CLIP/blob/main/CLIP.png?raw=true
Text options: ['a diagram', 'a dog', 'a cat', 'a neural network']
Pytorch: [[0.24351217 0.0032037 0.00082513 0.75245893]]
Tensorflow: [[0.24351244 0.0032039 0.0008252 0.7524584 ]]
@isaacgerg can you have a look if your error persists on this branch? I couldn't reproduce it yet. Would also be helpful if you could provide installed package versions.
My output:
(venv) $ python convertclip.py --model RN50 --output models/CLIP{model}