commentout earlystop
This commit is contained in:
		
							parent
							
								
									89ab58c5df
								
							
						
					
					
						commit
						e389acefa0
					
				|  | @ -4,7 +4,7 @@ from types import MethodType | ||||||
| import hydra | import hydra | ||||||
| from hydra.utils import instantiate | from hydra.utils import instantiate | ||||||
| from omegaconf import DictConfig, OmegaConf | from omegaconf import DictConfig, OmegaConf | ||||||
| from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint | from pytorch_lightning.callbacks import ModelCheckpoint | ||||||
| from pytorch_lightning.loggers import MLFlowLogger | from pytorch_lightning.loggers import MLFlowLogger | ||||||
| from torch.optim.lr_scheduler import ReduceLROnPlateau | from torch.optim.lr_scheduler import ReduceLROnPlateau | ||||||
| 
 | 
 | ||||||
|  | @ -45,15 +45,15 @@ def main(config: DictConfig): | ||||||
|         every_n_epochs=1, |         every_n_epochs=1, | ||||||
|     ) |     ) | ||||||
|     callbacks.append(checkpoint) |     callbacks.append(checkpoint) | ||||||
|     early_stopping = EarlyStopping( |     # early_stopping = EarlyStopping( | ||||||
|         monitor="val_loss", |     #     monitor="val_loss", | ||||||
|         mode=direction, |     #     mode=direction, | ||||||
|         min_delta=0.0, |     #     min_delta=0.0, | ||||||
|         patience=parameters.get("EarlyStopping_patience", 10), |     #     patience=parameters.get("EarlyStopping_patience", 10), | ||||||
|         strict=True, |     #     strict=True, | ||||||
|         verbose=False, |     #     verbose=False, | ||||||
|     ) |     # ) | ||||||
|     callbacks.append(early_stopping) |     # callbacks.append(early_stopping) | ||||||
| 
 | 
 | ||||||
|     def configure_optimizer(self): |     def configure_optimizer(self): | ||||||
|         optimizer = instantiate( |         optimizer = instantiate( | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 shahules786
						shahules786