Junqi Liu

Results 2 issues of Junqi Liu

2023昇腾AI创新大赛-算法创新-VisionLAN模型迁移复现 background:我们正在将[pytorch源代码](https://github.com/wangyuxin87/VisionLAN/tree/main)中的train_LF_1.py迁移至mindspore。遵循mindspore的训练范式,我们分别定义好模型、数据集、优化器、损失函数等,通过构造WithLossCell、调用Model类,使用model.train进行训练。 ***************** 遇到的问题:训练时报了如下错误,是关于getitem这个方法的: RuntimeError: The 'getitem' operation does not support the type [None, Int64].The supported types of overload function `getitem` is: [Tuple, Slice], [List, Slice], [Tensor, Ellipsis], [Tuple, Tensor],...

here is my code: from torch_ema import ExponentialMovingAverage model = ... optimizer = ... scheduler = ... ema_model = ExponentialMovingAverage(parameters=pg, decay=0.9999) for epoch in range(args.epochs):# train print('epoch:',epoch,'Current learning rate:', optimizer.param_groups[0]['lr'])...