RuntimeError: Boolean value of Tensor with more than one value is ambiguous

关于RuntimeError: Boolean value of Tensor with more than one value is ambiguous的问题
img
这是我的出问题的一些代码,网上都说是实例化的问题,但都无法解决,有人遇到过这种问题吗?
netG = model.Generator(opt.ngf, opt.nz).to(device)
netD_TS = model.Discriminator_TS(input_size, hidden_size, num_layers).to(device)
netD_RF = model.Discriminator_RF(opt.ndf).to(device)
img
self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=True)
img