diff --git a/job.py b/job.py index 801b842b722539c151d6a06b7e19aba567fbec48..0a381aa1e458b12061008ca690fbb060696bca73 100644 --- a/job.py +++ b/job.py @@ -11,8 +11,8 @@ def makejob(commit_id, model, nruns, time_wall): #SBATCH --nodes=1 #SBATCH --partition=gpu_prod_night #SBATCH --time={time_wall} -#SBATCH --output=logslurms/slurm-%A_%a.out -#SBATCH --error=logslurms/slurm-%A_%a.err +#SBATCH --output=logslurms/slurm-{model}%A_%a.out +#SBATCH --error=logslurms/slurm-{model}%A_%a.err #SBATCH --array=0-{nruns} @@ -66,7 +66,7 @@ parser = argparse.ArgumentParser() parser.add_argument("--time_wall", default="no_limit", - help="Time wall. Choose in [no-limit, hour, half, quarter]") + help="Time wall. Choose in [no_limit, hour, half, quarter]") parser.add_argument("--model_name", default ="Bi-LSTM", diff --git a/logs/RNN_13/best_model.pt b/logs/RNN_13/best_model.pt new file mode 100644 index 0000000000000000000000000000000000000000..09b47dc34b69108e83367faed6c66bff6c4be83f Binary files /dev/null and b/logs/RNN_13/best_model.pt differ diff --git a/logs/RNN_14/best_model.pt b/logs/RNN_14/best_model.pt new file mode 100644 index 0000000000000000000000000000000000000000..478d7a87dbe0dbaa1aefdaa3785bb1a8846f4b28 Binary files /dev/null and b/logs/RNN_14/best_model.pt differ diff --git a/logs/RNN_15/best_model.pt b/logs/RNN_15/best_model.pt new file mode 100644 index 0000000000000000000000000000000000000000..94a29624bfa72d5232c7898b35e3adf3191b0497 Binary files /dev/null and b/logs/RNN_15/best_model.pt differ diff --git a/logs/RNN_16/best_model.pt b/logs/RNN_16/best_model.pt new file mode 100644 index 0000000000000000000000000000000000000000..9e1c6e16495f61163f0018aebb46b9b954c015fc Binary files /dev/null and b/logs/RNN_16/best_model.pt differ diff --git a/logs/main_unit_test.log b/logs/main_unit_test.log index 966b8719b610489cf43c1ca6a0edde76c9b6db9a..d1cf5e00dd0017b7a06b29e743576ac9722406d8 100644 --- a/logs/main_unit_test.log +++ b/logs/main_unit_test.log @@ -1333,3 +1333,30 @@ INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx INFO:root: - The train fold has 542473 samples INFO:root: - The valid fold has 134687 samples +INFO:root:= Dataloaders for mean and standard deviation +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 541965 samples +INFO:root:= Dataloaders +INFO:root: - Dataset creation +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Generating the index +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - Loaded a dataset with 677160 samples +INFO:root: - Splitting the data in training and validation sets +INFO:root:Generating the subset files from 677160 samples +INFO:root: - Subset dataset +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root:The loaded dataset contains 25 latitudes, 37 longitudes, 28 depths and 2222 time points +INFO:root:Loading the index from sub_2CMEMS-MEDSEA-2010-2016-training.nc.bin_index.idx +INFO:root: - The train fold has 541837 samples +INFO:root: - The valid fold has 135323 samples diff --git a/model.py b/model.py index b43ba3678e2cada9f1889b1d19c33adc6682a127..3229622602e97d9485ab145ecd1b17430a895127 100644 --- a/model.py +++ b/model.py @@ -43,9 +43,15 @@ class RNN(nn.Module): self.hidden_size = cfg["RNN"]["HiddenSize"] self.num_layers = cfg["RNN"]["NumLayers"] # RNN - self.rnn = nn.RNN(input_size, self.hidden_size, self.num_layers, batch_first=True, nonlinearity='relu') + self.rnn = nn.Sequential( + nn.RNN(input_size, self.hidden_size, self.num_layers, batch_first=True, nonlinearity='relu'), + nn.Dropout(p=0.2) + ) - self.fc = nn.Linear(self.hidden_size, 1) + self.fc = nn.Sequential( + nn.Linear(self.hidden_size, 1), + nn.Dropout(p=0.2) + ) def forward(self, x): use_cuda = torch.cuda.is_available()