Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marco Cristoforetti
DST
Commits
1c4c5799
Commit
1c4c5799
authored
Mar 04, 2021
by
Marco Cristoforetti
Browse files
output
parent
56f760c8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
hist/history_tr_rmse_mae_reg_96_8_ns.txt
0 → 100644
View file @
1c4c5799
This diff is collapsed.
Click to expand it.
hist/history_ts_rmse_mae_reg_96_8_ns.txt
0 → 100644
View file @
1c4c5799
This diff is collapsed.
Click to expand it.
hist/history_valid_rmse_mae_reg_96_8_ns.txt
0 → 100644
View file @
1c4c5799
This diff is collapsed.
Click to expand it.
models/dst_reg_96_8_ns.pth
0 → 100644
View file @
1c4c5799
File added
scripts/training_reg.py
View file @
1c4c5799
...
...
@@ -183,6 +183,7 @@ sampler = torch.utils.data.sampler.WeightedRandomSampler(weights, num_samples= l
dataset_tr
=
Dataset
(
data_in_scaled
[
ixs_tr
],
data_out_scaled
[
ixs_tr
])
data_loader_tr
=
utils_data
.
DataLoader
(
dataset_tr
,
batch_size
=
BATCH_SIZE
,
num_workers
=
4
,
shuffle
=
False
,
sampler
=
sampler
)
#data_loader_tr = utils_data.DataLoader(dataset_tr, batch_size=BATCH_SIZE, num_workers = 4, shuffle=True)
class
DSTnet
(
nn
.
Module
):
def
__init__
(
self
,
nvars
,
nhidden_i
,
nhidden_o
,
n_out_i
,
before
,
after
):
...
...
@@ -232,9 +233,9 @@ loss_f = nn.L1Loss()
loss_mse
=
nn
.
MSELoss
()
nhidden_i
=
1
nhidden_o
=
6
4
n_out_i
=
16
nhidden_i
=
2
nhidden_o
=
9
6
n_out_i
=
8
before
=
BEFORE
nvars
=
data_in_scaled
.
shape
[
-
1
]
...
...
@@ -341,8 +342,8 @@ for epoch in range(num_epochs):
# dataset_tr = Dataset(data_in_scaled[ixs_tr], data_out_scaled[ixs_tr])
# data_loader_tr = utils_data.DataLoader(dataset_tr, batch_size=BATCH_SIZE, num_workers = 4, shuffle=False, sampler = sampler)
torch
.
save
(
dst_net
.
state_dict
(),
'/home/mcristofo/DST/models/dst_reg_
64_16_all
.pth'
)
torch
.
save
(
dst_net
.
state_dict
(),
'/home/mcristofo/DST/models/dst_reg_
96_8_ns
.pth'
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_tr_rmse_mae_reg_
64_16_all
.txt'
,
history_tr
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_valid_rmse_mae_reg_
64_16_all
.txt'
,
history_valid
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_ts_rmse_mae_reg_
64_16_all
.txt'
,
history_ts
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_tr_rmse_mae_reg_
96_8_ns
.txt'
,
history_tr
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_valid_rmse_mae_reg_
96_8_ns
.txt'
,
history_valid
)
np
.
savetxt
(
'/home/mcristofo/DST/hist/history_ts_rmse_mae_reg_
96_8_ns
.txt'
,
history_ts
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment