Commit 1f7a5866 authored by Christian Chapman-Bird's avatar Christian Chapman-Bird
Browse files

Fixed directory handling - may still be temperamental

parent 50229f6d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ from EMRI_DET.utilities import norm, norm_inputs, unnorm_inputs, unnorm, get_scr
from sys import stdout


def model_train_test(data, model, device, n_epochs, n_batches, loss_function, learning_rate, verbose=False):
def model_train_test(data, model, device, n_epochs, n_batches, loss_function, learning_rate, verbose=False, return_losses=False):
    xtrain, ytrain, xtest, ytest = data

    name = model.name
@@ -102,4 +102,7 @@ def model_train_test(data, model, device, n_epochs, n_batches, loss_function, le
    #plt.show()
    plt.close()

    out = (model,)
    if return_losses:
        out += (train_losses, test_losses,)
    return model
+2 −1
Original line number Diff line number Diff line
@@ -3,7 +3,8 @@ import sys


def get_script_path():
    return os.path.dirname(os.path.realpath(sys.argv[0]))
    #return os.path.dirname(os.path.realpath(sys.argv[0]))
    return os.getcwd()


def norm(dataframe, ref_dataframe=None, ref_mean=None, ref_std=None):
+271 −0

File added.

Preview size limit exceeded, changes collapsed.

+48.4 KiB

File added.

No diff preview for this file type.

+160 B

File added.

No diff preview for this file type.

Loading