多损失函数联合
loss_fn_1用于优化网络权重,loss_fn_2用于优化中心矢量
optim_1 = torch.optim.AdamW(weights.parameters(), lr=lr, weight_decay=1e-4)
optim_2 = torch.optim.RMSprop(weights.parameters(), lr=5e-3)
loss_fn_1 = nn.CrossEntropyLoss().to(device)
loss_fn_2 = CenterLoss(6, 6, size_average=True).to(device)
loss_rate = 5e-3
epochs = 15
index_train = 1
index_test = 1
acc =