Cosine embedding loss only supports 2-D tensors. The tensors you’re trying to pass in are 3-D. (I’ll take a look to see if we should make this clear in docs, error messages, and if we should support higher dim)