How to save my model with half precision
My model includes 5 resnet18, if they are saved with default precision(float32), then about 220MB space in my disk is occupied.
My idea is to reduce the storage to 110MB, so I used model.half() to apply precision 16.
I used torch.save(model.state_dict(),'model.pt') to save my model, however there still is 220MB for the model storage.
Does anyone know how to deal with this? Thanks very much.
    trainer = pl.Trainer(max_epochs=config['epochs'], gpus=[0, ], precision=16,
                         # limit_train_batches=config['limit_train_batches'],
                         # limit_val_batches=config['limit_val_batches'],
                         )