我有這個(gè)代碼:import torchlist_of_tensors = [ torch.randn(3), torch.randn(3), torch.randn(3)]tensor_of_tensors = torch.tensor(list_of_tensors)我收到錯(cuò)誤消息:ValueError:只有一個(gè)元素張量可以轉(zhuǎn)換為 Python 標(biāo)量如何將張量列表轉(zhuǎn)換為 pytorch 中的張量張量?
將張量列表轉(zhuǎn)換為張量的張量 pytorch
繁星點(diǎn)點(diǎn)滴滴
2022-10-18 19:49:33