- 打印的时候将省略的tensor全部展开显示: torch.set_printoptions(threshold=np.inf)
- 优化器:
optimizer = torch.optim.Adam([*i3d.parameters()] + [*evaluator.parameters()],lr=args.lr, weight_decay=args.weight_decay)
optimizer = torch.optim.SGD([*i3d.parameters()] + [*evaluator.parameters()],lr=args.lr,momentum=0.9)
optimizer = torch.optim.Adagrad([*i3d.parameters()] + [*evaluator.parameters()], lr=args.lr)
- 损失函数
criterion = nn.KLDivLoss()
criterion_dive_classifier = nn.CrossEntropyLoss()
criterion_caption = utils_1.LanguageModelCriterion()
criterion_score = nn.MSELoss()
|