Update script conventions
This commit is contained in:
+3
-2
@@ -140,7 +140,7 @@ def save_results(ml_super_frame, count_frame, subpixel_dist,
|
||||
plt.close()
|
||||
np.save(output_dir / '2Photon_subpixel_Distribution.npy', subpixel_dist)
|
||||
std, mean = np.std(subpixel_dist), np.mean(subpixel_dist)
|
||||
print(f"[Plotting]: Sub-pixel distribution: Std/Mean: {std/mean:.4f}")
|
||||
print(f"[Plotting]: Sub-pixel distribution: RMS/Mean: {std/mean:.4f}, expected value = {1/np.sqrt(mean):.4f} for uniform distribution")
|
||||
|
||||
print(f"Results saved to: {output_dir}")
|
||||
|
||||
@@ -149,7 +149,8 @@ if __name__ == "__main__":
|
||||
output_dir = prepare_output_folder(conf)
|
||||
|
||||
### model loading
|
||||
model = get_double_photon_model_class(conf.model.version)().cuda()
|
||||
model_version = conf.model.experiment_name.split('_v')[-1][:6]
|
||||
model = get_double_photon_model_class(model_version)().cuda()
|
||||
model.load_state_dict(torch.load(f'{conf.model.base_dir}/{conf.model.experiment_name}/Models/{conf.model.name}', weights_only=True))
|
||||
# model.eval()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user