Skip to content
Snippets Groups Projects
Commit 3e2c776b authored by CHARLAIX FLORIAN p1905458's avatar CHARLAIX FLORIAN p1905458
Browse files

Change data path to a relative path

parent 95c2b252
No related branches found
No related tags found
No related merge requests found
from functools import partial
from os.path import join
from os.path import join, abspath
from numpy.random import randint
from ray import tune
......@@ -59,13 +59,9 @@ def main(data_root, num_samples=10, max_num_epochs=10, gpus_per_trial=1):
best_checkpoint_dir, "checkpoint"))
best_trained_model.load_state_dict(model_state)
# If Pytorch don't save the end
print("In case saving...")
save(best_trained_model, "/home/flifloo/IA/model.pth")
print("Testing accuracy...")
print(f"Best trial test set accuracy: {test_accuracy(best_trained_model, data_root, device)}")
if __name__ == "__main__":
main("/home/flifloo/IA/data")
main(abspath("data"))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment