Your approach won’t work, as calling half() of parameters will not be applied inplace and thus the model won’t change (after fixing the indexing issue as named_parameters is a method).
Instead, call half() on the layers or use the mixed-precision util via torch.cuda.amp.autocast.