Skip to content

Commit

Permalink
Figure 7 fed avg and predicts
Browse files Browse the repository at this point in the history
  • Loading branch information
menelaoszetas1990 committed Aug 5, 2023
1 parent 1b961ae commit 8100047
Show file tree
Hide file tree
Showing 1,499 changed files with 7,080 additions and 1,363 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def to_sequences(dataset_x, dataset_y, _sequence_size=1):
return history


def storeData(_dictionary, _hidden_layers, _ship_number):
def store_data(_dictionary, _hidden_layers, _ship_number):
db = []
for hl_idx, _hidden_layer in enumerate(_hidden_layers):
db.append([])
Expand All @@ -95,7 +95,7 @@ def storeData(_dictionary, _hidden_layers, _ship_number):
db[hl_idx].append(0)
db[hl_idx][ep_idx] = _dictionary[_hidden_layer].history['loss'][ep_idx]

# Its important to use binary mode
# It is important to use binary mode
dbfile = open('pickle/Figure_2_ship_{}'.format(_ship_number), 'ab')

# source, destination
Expand Down Expand Up @@ -144,7 +144,7 @@ def storeData(_dictionary, _hidden_layers, _ship_number):
axes[row_number, column_number].legend(fontsize=28, loc=8, bbox_to_anchor=(0.5, -0.8))
axes[row_number, column_number].set_title('{}'.format(fig_names[_index]), fontsize=28)

storeData(history_dict[dataset_nums[_index]], hidden_layers, _index)
store_data(history_dict[dataset_nums[_index]], hidden_layers, _index)
fig.savefig('plots/Figure2_Training_Loss_for_Hidden_Layers_per_Epochs_per_Dataset_NO_DROPOUT.eps',
format='eps')
fig.savefig('../plots/Figure2/Figure2_Training_Loss_for_Hidden_Layers_per_Epochs_per_Dataset_NO_DROPOUT.eps',
Expand Down
Loading

0 comments on commit 8100047

Please sign in to comment.