错误描述
RuntimeError: [enforce fail at …\c10\core\:72] : not enough memory: you tried to allocate 45924761600 bytes. Buy new RAM!
分析
x = torch.ones((112121, 1, 40, 40)) # 第二个是in_channel
print(x)
print(x.size())
print(x.shape)
此处是设置的张量过大,导致内存分配不足