对tensor进行reshape操作,在torch中用view函数
tensor.item()是用来提取tensor中的数据的
torch——》numpy
如果此处是gpu类型的tensor,那么不能直接转a.numpy要用a.data.numpy
视频54分40秒左右解释了
numpy——》torch(为什么要转,因为gpu不支持numpy的运算)
torch.unsqueeze(不共享内存)
torch.expand(不共享内存),torch.expand_as,torch.view也不共享内存
torch.ceil()