涉及到多維tensor時,對softmax的參數dim總是很迷,下面用一個例子說明import torch.nn as nn m = nn.Softmax(dim=0) n = nn.Softmax(dim=1) k = nn.
確定! 回上一頁