代表什么:
预测值和真实值越来越大,模型效果不好
为啥?
# class MLPModel(nn.Module): # def __init__(self, input_size): # super(MLPModel, self).__init__() # self.fc1 = nn.Linear(input_size, 128) # self.fc2 = nn.Linear(128, 64) # self.fc3 = nn.Linear(64, 2) # # def forward(self, x): # x = torch.relu(self.fc1(x)) # x = torch.relu(self.fc2(x)) # x = self.fc3(x) # x = nn.functional.softmax(x, dim=1) # return x
可能出现梯度爆炸或者梯度消失的问题
标签:__,Loss,fc2,函数,nn,fc1,self,损失,Linear From: https://www.cnblogs.com/mxleader/p/17830587.html