torch.squeeze() 這個函數主要對數據的維度進行壓縮,去掉維數爲1的的維度,設圖像大小爲(1,36,60),可以去掉,變爲(36,60)
torch.fromnumpy()
torch.unsqueeze()都數據進行擴充(36,60),擴充爲(1,36,60)
torch.squeeze() 這個函數主要對數據的維度進行壓縮,去掉維數爲1的的維度,設圖像大小爲(1,36,60),可以去掉,變爲(36,60)
torch.fromnumpy()
torch.unsqueeze()都數據進行擴充(36,60),擴充爲(1,36,60)
class MetaCls(type): def __new__(cls, *args, **kwargs): print("in MetaCls") # return super(Meta