Pytorch--Tensor, Numpy--Array,Python--List 相互之間的轉換

  一、 Python--List   Numpy--Array list = [[1, 2, 4, 8], [0.1, 0.4, 0.9, 0.8]] list_np = np.array(list) print('list_np的維度:',list_np.shape) print('list_np的類型:',type(list_np)) 運行結果:python   二、Python--List
相關文章
相關標籤/搜索