Skip to content

Commit

Permalink
removed useless files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolashuynh committed Dec 18, 2023
1 parent 1767cda commit 7ed464d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 48 deletions.
19 changes: 10 additions & 9 deletions debugging/sample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#append to the path
# append to the path
import sys

sys.path.append("/home/nvth2/FourierDiffusion/src")
Expand All @@ -14,16 +13,18 @@ def visualize_ts(ts: torch.Tensor, title: str = "Time series") -> None:
fig, ax = plt.subplots()
ax.plot(ts.detach().cpu().numpy())
ax.set_title(title)
#save the plot
# save the plot
fig.savefig("/home/nvth2/FourierDiffusion/debugging/TimeSeries.png")
plt.show()


#Load the checkpoint

score_model = ScoreModule.load_from_checkpoint("/home/nvth2/FourierDiffusion/cmd/lightning_logs/x58vjcza/checkpoints/epoch=23-val_loss=0.02.ckpt")

# Load the checkpoint

score_model = ScoreModule.load_from_checkpoint(
"/home/nvth2/FourierDiffusion/cmd/lightning_logs/x58vjcza/checkpoints/epoch=23-val_loss=0.02.ckpt"
)
score_model.eval()
sampler = TSSampler(score_model, score_model.noise_scheduler)
ts = sampler(batch_size=2, num_inference_steps=1000)
visualize_ts(ts[0], title="Time series")

visualize_ts(ts[0], title="Time series")
39 changes: 0 additions & 39 deletions src/models/sampler.py

This file was deleted.

0 comments on commit 7ed464d

Please sign in to comment.