How should I replace the sentence torch.Assert from pytorch-1.7.1 to some other sentence in pytorch-1.5.0
The thing is I need to reimplement a GAN model using torch1.5.0 but the previous torch1.7.1 version codes contains a torch.Assert sentence to do symbolic assert. What sentence should I use to do the same thing?

Just use python's native assert. That's what it does under the hood.
torch._assert(x == y, 'assertion message')

to be replaced with
assert x == y, 'assertion message'

