Since the params already contains all the parameter, it is able to train using both methods. But what will happen if I only include partial modules in the init operation?
Thanks for the reply.
Actually we switched from torch.cuda.amp to apex due to some internal reasons.
I studied the doc for apex, but found no instruction on this aspect. Could you please provide some suggestions regarding the above issue? Thanks!
The passed modules to amp.initialize will get patched based on the used opt_level. If you are not passing all modules to it, autocasting might not work and/or the code might break in another unexpected way.
Note that apex.amp won’t get any new features anymore, as the current development is focused on the native implementation.