CLIP
CLIP copied to clipboard
Fixed documentation for Zero-Shot Prediction
norm must be done with dim=1 not dim=-1
dim=1 and dim=-1 are the same
@GentelmanTenyeaers Not strictly, it depends on the number of dimensions of the input tensor. The problem is if someone blindly copies the examples and modified it's for his own use, no realizing the -1 is not the intended dimension.
Plus the code internally actually uses dim=1 https://github.com/openai/CLIP/blob/a9b1bf5920416aaeaec965c25dd9e8f98c864f16/clip/model.py#L363