From 49ad7d6c288fa2b7a4cac913c099c0353d7230ad Mon Sep 17 00:00:00 2001 From: William Falcon Date: Mon, 8 Jul 2019 20:00:43 -0400 Subject: [PATCH] scaled batch size --- pytorch_lightning/models/trainer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 5678efb0..d70a9582 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -136,6 +136,16 @@ class Trainer(TrainerIO): if self.use_amp: print('using 16bit precision') + if self.use_amp and not APEX_AVAILABLE: + msg = ''' + You set use_amp=True but do not have apex installed. + Install apex first using this guide and rerun with use_amp=True: + https://github.com/NVIDIA/apex#linux + ''' + raise Warning(msg) + + print('not using 16 bit') + def __determine_data_use_amount(self, train_percent_check, val_percent_check, test_percent_check, overfit_pct): """ Use less data for debugging purposes