Pytorch1.7报错 Output 0 of UnbindBackward is a view and is being modified inplace

67 阅读1分钟

utils里内容改成

        if scale_each is True:
            for idx, _ in enumerate([jj for jj in tensor]):
                t = tensor[idx]
            # for t in tensor:  # loop over mini-batch dimension
            #     norm_range(t, range)