Hi @gchanan.  I get similar error with resize_ function.
But the solution with.torch.no_grad()  seems no working.
Here is the example:
if we have a with  torch.Size([64, 3, 7, 7])
and b  with torch.Size([58, 3, 7, 7])
a.resize_(b.size())

RuntimeError: set_sizes_contiguous is not allowed on Tensor created from .data or .detach()