-
Notifications
You must be signed in to change notification settings - Fork 75
Pressure Field work #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bojunZhang-heng
wants to merge
183
commits into
Mohamedelrefaie:main
Choose a base branch
from
bojunZhang-heng:Pressure_Filed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
b03c7fd
Create a pull request
bojunZhang-heng 71c5c85
Model_Evaluation.sh Init
bojunZhang-heng 792b732
Model_Preprocess.sh Init
bojunZhang-heng d6f8a22
Model_Test.sh Init
bojunZhang-heng 5beacaf
Model_Training.sh Init
bojunZhang-heng e26e4c1
python_learn Init
bojunZhang-heng d2df2f0
Pressure_train.lsf uInit
bojunZhang-heng 4ea678a
My_python_job/train.py update
bojunZhang-heng 776a23f
My_python_job/Usage_train.py upadte
bojunZhang-heng cc3072b
Usage_train.py update
bojunZhang-heng 7165861
train.py update
bojunZhang-heng ff134a9
Model_Training.sh update
bojunZhang-heng 683e256
My_python_job/Usage_train.py update
bojunZhang-heng 3f4afa3
My_python_job/train.py update
bojunZhang-heng 6446ca2
data_loader.py update
bojunZhang-heng b8d8812
train.py update
bojunZhang-heng f31b705
Pressure_train.lsf update
bojunZhang-heng e35b92f
My_python_job/Usage_data_loader.py update
bojunZhang-heng b4e20f5
My_python_job/Usage_model_pressure.py data_loader.py update
bojunZhang-heng 4245b11
My_python_job/utils.py update
bojunZhang-heng 3990fff
Model_Training.sh update
bojunZhang-heng 429a8f5
My_python_job/Model_Training.sh update
bojunZhang-heng 9a35ed3
My_python_job/Usage_data_loader.py update
bojunZhang-heng 1f70f94
My_python_job/Usage_train.py update
bojunZhang-heng 378b488
My_python_job/run_pipeline.py update
bojunZhang-heng 1900d0e
My_python_job/train.py update
bojunZhang-heng 821a2cd
My_python_job/data_loader.py update
bojunZhang-heng 687434f
run_pipeline.py update
bojunZhang-heng ac306bc
My_python_job/Pressure_train.lsf
bojunZhang-heng cb50162
My_python_job/model_pressure.py update
bojunZhang-heng e7513ef
My_python_job/Usage_run_pipeline.py
bojunZhang-heng b4a9d8d
.gitignore updata
bojunZhang-heng 623324e
.gitignore update
bojunZhang-heng a00064e
My_python_job/Model_Training.sh update
bojunZhang-heng 87f1cf5
My_python_job/Usage_train.py update
bojunZhang-heng 73b54f0
My_python_job/run_pipeline.py update
bojunZhang-heng 7fe6185
My_python_job/train.py
bojunZhang-heng 90a36dc
My_python_job/model_pressure.py update
bojunZhang-heng 1232c57
My_python_job/model_pressure.py self.bn3->self.bn4 update
bojunZhang-heng a92212b
My_python_job/Usage_model_pressure.py update
bojunZhang-heng f406df1
My_python_job/Usage_run_pipeline.py update
bojunZhang-heng dbb417c
My_python_job/train.py update
bojunZhang-heng 87703a2
.gitignore update
bojunZhang-heng b92e835
Usage_model_pressure.py update
bojunZhang-heng 653b8a9
model_pressure.py update
bojunZhang-heng bb9bfe4
My_python_job/Usage_data_loader.py update
bojunZhang-heng 1a64135
My_python_job/Usage_train.py update
bojunZhang-heng 374be39
My_python_job/data_loader.py update
bojunZhang-heng ad094fe
My_python_job/train.py update
bojunZhang-heng 314fb1f
train.py update
bojunZhang-heng fc6fba9
error.py update
bojunZhang-heng 31efcee
error_convergence.png update
bojunZhang-heng 3c8214a
My_python_job/Model_Training.sh update
bojunZhang-heng 6ef7f86
My_python_job/Usage_data_loader.py
bojunZhang-heng aa6a143
My_python_job/data_loader.py update
bojunZhang-heng 8857bc8
My_python_job/train.py update
bojunZhang-heng dd60153
Model_Training.sh update
bojunZhang-heng b49eeba
Pressure_train.lsf update
bojunZhang-heng d5cde42
Usage_train.py update
bojunZhang-heng 8504d1a
train.py update
bojunZhang-heng 50668dd
Usage_HyperParameter.py update
bojunZhang-heng 5c626d2
Model_Training.sh update
bojunZhang-heng 9503b51
Pressure_train.lsf update
bojunZhang-heng f3d667e
Usage_HyperParameter.py update
bojunZhang-heng 849d510
Usage_train.py update
bojunZhang-heng 34ecfdc
train.py update
bojunZhang-heng b33b8aa
.gitignore update
bojunZhang-heng e1dd167
Model_Preprocess.sh update
bojunZhang-heng 051f1ef
tail.sh update
bojunZhang-heng bd5d8a9
experiments/ check png file
bojunZhang-heng 2ac80e2
My_python_job/Usage_train.py update
bojunZhang-heng 6baeb89
My_python_job/experiments/ update
bojunZhang-heng ef5bc98
My_python_job/train.py update
bojunZhang-heng 2c50f27
train.py update
bojunZhang-heng 1230761
GPU_list.sh update
bojunZhang-heng deea1ee
tail.sh update
bojunZhang-heng 4824d50
train.py init
bojunZhang-heng 96989b9
My_python_job/experiments/ update
bojunZhang-heng 2f03fb9
My_python_job/train.py update
bojunZhang-heng 6699745
train.py udpate
bojunZhang-heng 7375046
run_pipeline.py update
bojunZhang-heng 0068c05
experiments/ update
bojunZhang-heng 634076e
.gitignore update
bojunZhang-heng cf96bff
My_python_job/train.py update
bojunZhang-heng f720a4b
delete *.png update
bojunZhang-heng 95eaa83
experiments/ update
bojunZhang-heng 0719fa6
My_python_job/experiments/ update
bojunZhang-heng 0b2a0a6
./My_python_job/experiments/ update
bojunZhang-heng 8a835e6
GPU_list.sh update
bojunZhang-heng 4e42a5a
shell script update
bojunZhang-heng ef5aadd
Pressure_train.lsf update
bojunZhang-heng 83354ed
move script into model_script folder
bojunZhang-heng fcc5178
Move usage file into Usage_python
bojunZhang-heng dc80e5d
My_python_job/experiments/ update
bojunZhang-heng b86a8a0
My_python_job/train.py update
bojunZhang-heng 9ab58be
My_python_job/experiments/
bojunZhang-heng 4e7d270
Merge branch 'Mohamedelrefaie:main' into Pressure_Filed
bojunZhang-heng f22d347
PRESSURE_ variable is python scalar update
bojunZhang-heng b61f6e0
./Model_Training.sh update
bojunZhang-heng 51d8201
My_python_job/Model_Script/Model_Training.sh update
bojunZhang-heng f3bfdf5
My_python_job/Pressure_train.lsf update
bojunZhang-heng 4156701
My_python_job/experiments/Train_Test/ update
bojunZhang-heng 701aead
My_python_job/experiments/ update
bojunZhang-heng fb28ace
Pressure_train.lsf update
bojunZhang-heng fa00804
My_python_job/experiments/Train_Test/ update
bojunZhang-heng b2d7473
Save local edits
bojunZhang-heng 7af39b1
My_python_job/experiments/Train_Test/ update
bojunZhang-heng 2d397b5
update
bojunZhang-heng 29c5a35
update
bojunZhang-heng 04dc766
My_python_job/experiments/Train_Test/ update
bojunZhang-heng 599e327
train.py PRESSURE_ a pytroch tensor update
bojunZhang-heng 180af98
experiments/ update
bojunZhang-heng 646d146
My_python_job/ update
bojunZhang-heng 95b1ce5
Revert "train.py PRESSURE_ a pytroch tensor update"
bojunZhang-heng b7566df
run_pipeline.py update
bojunZhang-heng 391f607
My_python_job/Model_Script/Model_Preprocess.sh update
bojunZhang-heng fbb0d53
My_python_job/Model_Script/Model_Training.sh update
bojunZhang-heng 52db900
My_python_job/experiments/ update
bojunZhang-heng 69a1327
My_python_job/run_pipeline.py update
bojunZhang-heng b1c795b
My_python_job/train.py update
bojunZhang-heng d527ef2
My_python_job/Model_Script/Model_Evaluate.sh update
bojunZhang-heng eebd0a6
My_python_job/evaluate.py update
bojunZhang-heng dcf1f1e
My_python_job/results/ update
bojunZhang-heng 7116d78
My_python_job/evaluate.py update
bojunZhang-heng 3e23c72
My_python_job/results/ update
bojunZhang-heng bb51bce
Pressure_train.lsf update
bojunZhang-heng 2725268
./evaluate.py update
bojunZhang-heng 77daae2
./experiments/ update
bojunZhang-heng a0dfd16
My_python_job/Pressure_train.lsf update
bojunZhang-heng 0ed188c
My_python_job/Usage_python/Usage_Colorama.py update
bojunZhang-heng 0e1e020
My_python_job/Usage_python/Usage_evaluate.py update
bojunZhang-heng c0cd606
./results/ update
bojunZhang-heng 970dd34
rm experiments
bojunZhang-heng 207aec0
./experiments/ corret version
bojunZhang-heng c611b40
./experiments/ delete
bojunZhang-heng 9d3c83a
./experiments/ update
bojunZhang-heng 2ed5138
My_python_job/Usage_python/Usage_Colorama.py update
bojunZhang-heng d83361d
My_python_job/evaluate.py update
bojunZhang-heng d49da7e
My_python_job/results/ update
bojunZhang-heng b7c5f62
My_python_job/results/Train_Test/visualize_plt.py update
bojunZhang-heng e493e25
My_python_job/results/Train_Test/visualization.png update
bojunZhang-heng 6ae8dd9
results/Train_Test/visualize_plt.py update
bojunZhang-heng 9a5a7e3
results/Train_Test/visualize_plt.py deleted
bojunZhang-heng 4437622
results/ update
bojunZhang-heng 139aa2a
My_python_job/Usage_python/Usage_visualize_ply.py update
bojunZhang-heng e3940c7
My_python_job/visualize_plt.py update
bojunZhang-heng 04bef92
results/ update
bojunZhang-heng 393149e
results/ update
bojunZhang-heng 8ee75a9
My_python_job/Usage_python/Usage_visualize_ply.py update
bojunZhang-heng 1e1d962
My_python_job/visualize_plt.py update
bojunZhang-heng 1eb9049
My_python_job/results/ update
bojunZhang-heng db994e1
My_python_job/visualize_plt.py update
bojunZhang-heng f7dde31
My_python_job/results/ update
bojunZhang-heng 5ca311e
Pressure_train.lsf update
bojunZhang-heng 696ce86
My_python_job/evaluate.py update
bojunZhang-heng 840d50b
results/ update
bojunZhang-heng f6e4196
Pressure_train.lsf update
bojunZhang-heng e400667
Model_Script/Model_Preprocess.sh update
bojunZhang-heng d38bfa2
My_python_job/Usage_python/Usage_data_loader.py update
bojunZhang-heng 8fd0922
My_python_job/data_loader.py update
bojunZhang-heng 80fe513
My_python_job/run_pipeline.py update
bojunZhang-heng f512825
My_python_job/Usage_python/Usage_run_pipeline.py
bojunZhang-heng b14d5c2
My_python_job/Pressure_train.lsf update
bojunZhang-heng d8b400d
My_python_job/Model_Script/Model_Evaluate.sh update
bojunZhang-heng 485feb4
My_python_job/Model_Script/Model_Preprocess.sh update
bojunZhang-heng 35baf53
My_python_job/Pressure_train.lsf update
bojunZhang-heng 5e9d1b2
My_python_job/Usage_python/Usage_model_pressure.py update
bojunZhang-heng b446aa5
My_python_job/experiments/ update
bojunZhang-heng 0c521be
My_python_job/model_pressure.py update
bojunZhang-heng 42f86b3
My_python_job/results/ update
bojunZhang-heng e0dd508
My_python_job/run_pipeline.py update
bojunZhang-heng 9132a16
My_python_job/Usage_python/Usage_model_pressure.py update
bojunZhang-heng c3957ff
My_python_job/model_pressure.py update
bojunZhang-heng b1d4fba
My_python_job/Usage_python/Usage_model_pressure.py update
bojunZhang-heng 04ff3c1
My_python_job/model_pressure.py update
bojunZhang-heng aa34702
postProcess/
bojunZhang-heng 6049a6f
pointNet_To_vtk.py update
bojunZhang-heng 084341b
../../../Usage_python/Usage_model_pressure.py update
bojunZhang-heng ca72ba8
so many files
bojunZhang-heng b367562
png file
bojunZhang-heng dd0d578
pointNet_To_vtk.py update
bojunZhang-heng adf7a6a
pointNet_To_vtk.py update
bojunZhang-heng 34cc19b
vtk file
bojunZhang-heng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| python run_pipeline.py \ | ||
| --stages evaluate \ | ||
| --exp_name "DrivAerNet_Pressure" \ | ||
| --dataset_path "$HOME/ML_Turbulent/Data_Pressure_Field/Data_Pressure/PressureVTK/N_S_WWS_WM" \ | ||
| --cache_dir "$HOME/ML_Turbulent/Data_Pressure_Field/Cache_data" \ | ||
| --subset_dir "$HOME/ML_Turbulent/DrivAerNet/train_val_test_splits" \ | ||
| --num_points 10000 \ | ||
| --num_eval_samples 5 \ | ||
| --gpus "0" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| python run_pipeline.py \ | ||
| --stages preprocess \ | ||
| --exp_name "DrivAerNet_Pressure" \ | ||
| --dataset_path "$HOME/ML_Turbulent/Pressure_Field/Data_Pressure/PressureVTK/N_S_WWS_WM" \ | ||
| --cache_dir "$HOME/ML_Turbulent/Pressure_Field/Cache_data" \ | ||
| --subset_dir "$HOME/ML_Turbulent/Pressure_Field/train_val_test_splits" \ | ||
| --num_points 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| python test_single_vtk.py \ | ||
| --model_checkpoint "experiments/DrivAerNet_Pressure/best_model.pth" \ | ||
| --vtk_file "$HOME/ML_Turbulent/Data_Pressure_Field/Data_Pressure/PressureVTK/N_S_WWS_WM/N_S_WWS_WM_001.vtk" \ | ||
| --output_dir "visualizations" \ | ||
| --num_points 10000 \ | ||
| --k 40 \ | ||
| --emb_dims 1024 \ | ||
| --dropout 0.4 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| python run_pipeline.py \ | ||
| --stages train \ | ||
| --exp_name "DrivAerNet_Pressure" \ | ||
| --dataset_path "$HOME/ML_Turbulent/Data_Pressure_Field/Data_Pressure/PressureVTK/N_S_WWS_WM" \ | ||
| --subset_dir "$HOME/ML_Turbulent/DrivAerNet/train_val_test_splits" \ | ||
| --cache_dir "$HOME/ML_Turbulent/Data_Pressure_Field/Cache_data" \ | ||
| --num_points 10000 \ | ||
| --batch_size 12 \ | ||
| --epochs 150 \ | ||
| --gpus "0, 1" | ||
|
|
||
|
|
||
| # === Variable === | ||
| # --batch_size | ||
| # It defines how many samples are processed at once per training step | ||
| # | ||
| # --epochs | ||
| # | ||
| # Total number of training rounds over the whole dataset | ||
| # e.g. 10000 samples, batch_size = 100 | ||
| # 10 000 / 100 = 100 steps for one epoch | ||
| # --epochs 150 have 150 times loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| python run_pipeline.py \ | ||
| --stages train \ | ||
| --exp_name "DrivAerNet_Pressure" \ | ||
| --dataset_path "$HOME/ML_Turbulent/Data_Pressure_Field/Data_Pressure/PressureVTK/N_S_WWS_WM" \ | ||
| --subset_dir "$HOME/ML_Turbulent/DrivAerNet/train_val_test_splits" \ | ||
| --cache_dir "$HOME/ML_Turbulent/Data_Pressure_Field/Cache_data" \ | ||
| --num_points 10000 \ | ||
| --batch_size 12 \ | ||
| --epochs 150 \ | ||
| --gpus "0, 1, 2" | ||
|
|
||
|
|
||
| # === Variable === | ||
| # --batch_size | ||
| # It defines how many samples are processed at once per training step | ||
| # | ||
| # --epochs | ||
| # | ||
| # Total number of training rounds over the whole dataset | ||
| # e.g. 10000 samples, batch_size = 100 | ||
| # 10 000 / 100 = 100 steps for one epoch | ||
| # --epochs 150 have 150 times loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| """ | ||
|
|
||
| """ |
11 changes: 11 additions & 0 deletions
11
RegDGCNN_SurfaceFields/My_python_job/Usage_model_pressure.py
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, file currently appears to be empty except for import statements and a docstring. No functional code is present. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import torch | ||
| import torch.nn as nn | ||
|
|
||
| """ | ||
|
|
||
| """ | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| # ============ Function Usage ============ | ||
| import torch | ||
| import torch.distributed as dist | ||
| import torch.multiprocessing as mp | ||
|
|
||
| # Import modules | ||
| from model_pressure import RegDGCNN_pressure | ||
| ''' | ||
|
|
||
| # DDP: Distributed Data Parallel | ||
| 1.---- | ||
| world_size = len(gpu_list.split(',')) | ||
| #! | ||
| gpu_list -> "0, 1, 2" | ||
| gpu_list.split(',') -> ['0', '1', '2'] | ||
| len(gpu_list.split(',')) -> 3 | ||
|
|
||
| 2.---- | ||
| exp_dir = os.path.join('experiments', args.exp_name) | ||
| #! | ||
| Build a path "./experiments/exp_name" | ||
|
|
||
| 3.---- | ||
| os.makedirs(exp_dir, exist_ok=True) | ||
| #! | ||
| Create the directory "exp_dir" if it doesn't already exist | ||
|
|
||
| 4.---- | ||
| mp.spawn(train_and_evaluate, args=(world_size, args), nprocs=world_size, join=True) | ||
| #! | ||
| train_and_evaluate(rank, world_size, args) | ||
| # rank : which GPU this process is using | ||
| # world_size : total number of GPUS | ||
| # args: your parsed command-line arguments | ||
| #! | ||
| mp.spawn(...) | ||
| -> | ||
| train_evaluate(rank=0, world_size= , args=args) | ||
| train_evaluate(rank=1, world_size= , args=args) | ||
| train_evaluate(rank=2, world_size= , args=args) | ||
| train_evaluate(rank=3, world_size= , args=args) | ||
| ... | ||
|
|
||
| 5.---- | ||
| dist.init_process_group(backend='nccl', init_method='env://', world_size=world_size, rank=rank) | ||
| #! | ||
| Starts the communication backend for DDP | ||
| # nccl: NVDIA backend for multi-GPU | ||
| # evv:// Uses evvironmen variables(e.g. RANK, WORLD_SIZE, etc) | ||
|
|
||
| 6.----- | ||
| torch.cuda.set_device(local_rank) | ||
| #! | ||
| Each process uses a single GPU | ||
| Set the GPU this process will use | ||
|
|
||
| 7.----- | ||
| args = vars(args) | ||
| #! | ||
| Convert it to a regular dictionary | ||
| e.g. {'epoch': 10, 'lr': 0.0001} | ||
|
|
||
| 8.----- | ||
| model = RegDGCNN_pressure(args).to(local_rank) | ||
| #! | ||
| RegDGCNN_pressure(args): Creates an instance of your custom model class | ||
| .to(local_rank): Moves the model to the current corret GPU | ||
| #! | ||
| The detail please see Usage_model_pressure.pu | ||
|
|
||
| 10.---- | ||
| model = torch.nn.parallel.DistributedDataParallel( | ||
| model, | ||
| device_ids=[local_rank], | ||
| find_unused_parameters=True, | ||
| output_device=local_rank | ||
| ) | ||
| #! | ||
| Wrap it with DDP so Pytorch handles multi-GPU | ||
| synchronization and data parallelism | ||
| #! | ||
| model | ||
| The model aleady moved to the local GPU | ||
| #! | ||
| device_ids=[local_rank] | ||
| Restrict this process to use only one GPU | ||
| #! | ||
| find_unused_parameters=True | ||
| It tells pyTorch "Some layers in my model might not be used every time I call forward() | ||
| -> so please handle that correctly" | ||
| The detail please see Usage_model_pressure.py forwar() function | ||
|
|
||
| #! | ||
| output_device=local_rank | ||
| Ensures outputs go to the same GPU as inputs | ||
|
|
||
| 11.---- | ||
| criterion = torch.nn.MSELoss() | ||
| #! | ||
| Loss function: | ||
| This sets up Mean Squared Error(MSE) as the loss function, commonly used for regression problems | ||
| It measures the average of the squares of the differences between predicted and actual values: | ||
| MSE = 1/n * sum((yi - y)^2) i = 1, ... , n | ||
|
|
||
| 12.---- | ||
| optimizer = optim.Adam(model.parameters(), lr=args.lr, weight_decay=1e-4) | ||
| #! | ||
| Uses Adam(Adaptive Moment Estimation), a popular optimizer that adjusts learning rates for each parameter | ||
| #! | ||
| model.parameter() | ||
| ->Tell the optimizer which parameters to update | ||
| #! | ||
| lr = args.lr | ||
| ->learning rate | ||
| #! | ||
| weight_decay=1e-4 | ||
| ->adds L2 regularization to reduce overfitting | ||
|
|
||
| 13.---- | ||
| scheduler = ReduceLROnPlateau(optimizer, 'min', patience=10, factor=0.1, verbose=True) | ||
| #! | ||
| Automatically reduces the learning rate when the validation loss plateaus(stops improving) | ||
| #! | ||
| 'min' | ||
| ->Try to minimize val loss | ||
| -> By default 1e-4 | ||
| #! | ||
| patience=10 | ||
| ->Wait for 10 epochs without improvement | ||
| #! | ||
| factor=0.1 | ||
| ->Multiplies LR by 0.1 | ||
| #! | ||
| e.g. | ||
| Epoch 1 - Validation Loss: 0.470 | ||
| LR : 0.01 | ||
| Epoch 2 - Validation Loss: 0.471 | ||
| LR : 0.01 | ||
| Epoch 3 - Validation Loss: 0.471 | ||
| LR : 0.01 | ||
| Epoch 4 - Validation Loss: 0.470 | ||
| LR : 0.01*0.1 | ||
|
|
||
| ''' | ||
|
|
||
|
|
||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file currently appears to be empty except for import statements and a docstring. No functional code is present.