After torch::load model and predict, then got NaN

Thanks the the update! No, double shouldn’t be a problem.
So it seems that the fc1 layer already creates these large values. Could you check the weight and bias of this layer and post it here, please?