假设我有内存列表。每个元素都是形状的pytorch张量。list_of_tensors = [tensor1, tensor2, tensor3, tensor4](1, 1, 84, 84)
我想连接张量列表以获得形状的张量。 也许肯定会允许我这样做。 必须是张量的元组,所以或不起作用。(4, 1, 84, 84)torch.cat(TT, dim=0)TTtorch.cat(*list_of_tensors, dim=0)torch.cat((*list_of_tensors), dim=0)
如何使用和创建新的形状张量list_of_tensorstorch.cat(???, dim=0)(4, 1, 84, 84)
慕的地6264312
慕桂英546537
随时随地看视频慕课网APP
相关分类