How to compare a torch::tensor shape against some other shapes?

Hello every one,
I’m trying to compare a torch::Tensors sizes agains something else, but it seems I’m doing it wrong!
I tried

    auto t = torch::ones({ 3,3 }).sizes();
    std::cout << c10::IntArrayRef{ 3,3 } << std::endl;
    std::cout << (t.equals(c10::IntArrayRef{ 3,3 })) << std::endl;

which always returns false!
I also tried

t == c10::IntArrayRef{ 3,3 };

which also returns false!
Whats wrong here?

This is just an example:

torch::Tensor out_tensor = module.forward({input_tensor}).toTensor();
std::cout << "dimensions:" << out_tensor.ndimension() << "\n";
std::cout << "v_size1:" << out_tensor.size(1) << "\n";
std::cout << "v_size2:" << out_tensor.size(2) << "\n";

Thanks but it doesnt answer the question. I’m specifically after comparing the shapes of the tensors. I’m specifically want to avoid comparing each dimension by hand.

Is this what you are looking for?

torch.equal(torch.Tensor([60,16,32,64]), torch.Tensor(list(out.shape)))

Thank you very much
I need to add that the normal == should work out of the box, and my case was a special occurance where this wasnt wroking under the debug build while it was working under the release for some unknown reasons. I spent a lot of time investigating this to no luck! I ultimately concluded as not a torch issue but maybe a VS2019 /VC++/weird project configuration issue.