|
|
|
@ -70,8 +70,14 @@ if __name__ == "__main__":
|
|
|
|
|
lut_model_size = np.sum([x.nelement()*x.element_size() for x in lut_model.parameters()])
|
|
|
|
|
print("Saved to", lut_path, f"{lut_model_size/(2**20):.3f} MB")
|
|
|
|
|
|
|
|
|
|
Path(config.models_dir / f"last_transfered_net.pth").symlink_to(config.model_path.resolve())
|
|
|
|
|
Path(config.models_dir / f"last_transfered_lut.pth").symlink_to(lut_path.resolve())
|
|
|
|
|
link = Path(config.models_dir / f"last_transfered_net.pth")
|
|
|
|
|
if link.exists():
|
|
|
|
|
link.unlink()
|
|
|
|
|
link.symlink_to(config.model_path.resolve())
|
|
|
|
|
link = Path(config.models_dir / f"last_transfered_lut.pth")
|
|
|
|
|
if link.exists():
|
|
|
|
|
link.unlink()
|
|
|
|
|
link.symlink_to(lut_path.resolve())
|
|
|
|
|
print("Updated link", config.models_dir / f"last_transfered_net.pth")
|
|
|
|
|
print("Updated link", config.models_dir / f"last_transfered_lut.pth")
|
|
|
|
|
|
|
|
|
|