I was using the zeroshot_classification.py accuracy function to calculate top 1 and top 5 accuracy. I passed two tensors as required: output with shape [50000, 1000] and target with shape [50000] to it, and got a TypeError: only 0-dimensional arrays can be converted to Python scalars error from the accuracy function. I fixed it by adding a squeeze function to the result computation.
Unsure if this is a bug or if there is a different intended way of using it. Can open a PR if this is a bug.