Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Update neuralnet indent #38

Merged
merged 18 commits into from
Apr 26, 2021
Merged

Update neuralnet indent #38

merged 18 commits into from
Apr 26, 2021

Conversation

manonreau
Copy link
Collaborator

Update the NeuralNet Class:

Split the init into :

load_pretrained_model
load_model
put_the_model
set_loss
That way Graphprot can be test as follow :

if the model is already loaded and trained:
model.test(database_test)

if a pretrained model is loaded:
model = NeuralNet(database_test, gnn, pretrained_model = model_saved, target=None)
model.test()

This avoid loading twice the database

  • Trimmed trailing whitespace
  • removed tabs -> 4spaces

Copy link
Member

@NicoRenaud NicoRenaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one small comment about a function name
otherwise all good

self.valid_acc = []
self.valid_loss = []

def put_the_model(self, dataset, Net):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small thing but maybe the name of this function should be b it more clear (put_model_to_device or something)

@manonreau manonreau merged commit 986a245 into master Apr 26, 2021
@manonreau manonreau deleted the update_nueralnet_indent branch May 20, 2021 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants