Skip to content
Snippets Groups Projects
Commit ffeb1c63 authored by Christian Chapman-Bird's avatar Christian Chapman-Bird
Browse files

out activation properly added

parent 12a52393
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ def create_mlp(input_features, output_features, neurons, layers, activation, mod
raise RuntimeError('Length of neuron vector does not equal number of hidden layers.')
else:
neurons = [neurons, ]
model = LinearModel(input_features, output_features, neurons, layers, activation, model_name, initialisation=init, use_dropout=use_dropout,drop_p=drop_p,use_bn=use_bn)
model = LinearModel(input_features, output_features, neurons, layers, activation, model_name, initialisation=init, use_dropout=use_dropout,drop_p=drop_p,use_bn=use_bn, out_activation=out_activation)
model.norm_type=norm_type
Path(get_script_path()+f'/../models/{model_name}/').mkdir(parents=True, exist_ok=True)
pickle.dump(model, open(get_script_path()+f'/../models/{model_name}/function.pickle', "wb"), pickle.HIGHEST_PROTOCOL) # save blank model
......
......@@ -66,7 +66,8 @@ def run_on_dataset(model, test_data, distances=None, n_batches=1, device=None, y
distances = np.ones(xdata.shape[0]) * 0.5
out_unnorm *= (0.5/distances)[:,None]
if ydata.ndim == 1:
out_unnorm = out_unnorm.flatten()
outputs = (out_unnorm,)
if runtime:
......
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