pytorch中的repeat()

這兩天寫程序中須要,查到了一個很是好用的函數,爛筆頭比好記性好用,記錄下:python import torch x = torch.tensor([1, 2, 3]) print(x.repeat(4)) print("###################################") print(x.repeat(4, 1)) 運行結果以下: web import torch x =
相關文章
相關標籤/搜索