Are you trying to treat the (10x10) tensors as (100) tensors for the purpose of cosine similarity? In that case you can use view() to create a view that is of the correct shape.
http://pytorch.org/docs/master/tensors.html#torch.Tensor.view 14
However, the shape of your label tensor c suggests that you might be trying to take cosine similarity along the 1st dimension (0 indexed). In that case you could use permute() or transpose().
http://pytorch.org/docs/master/tensors.html#torch.Tensor.transpose 7