From 2efadd2d50307519c755027ae038fe3a7c0041c4 Mon Sep 17 00:00:00 2001 From: Kilian Fatras Date: Thu, 14 Dec 2023 14:44:42 -0500 Subject: [PATCH] pep8 --- examples/notebooks/SF2M_2D_example.ipynb | 7 ++++--- examples/notebooks/single-cell_example.ipynb | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/notebooks/SF2M_2D_example.ipynb b/examples/notebooks/SF2M_2D_example.ipynb index e6e4692..681de0f 100644 --- a/examples/notebooks/SF2M_2D_example.ipynb +++ b/examples/notebooks/SF2M_2D_example.ipynb @@ -128,13 +128,13 @@ " x0,\n", " t_span=torch.linspace(0, 1, 100).to(device),\n", " )\n", - " \n", - " \n", + "\n", + "\n", "class SDE(torch.nn.Module):\n", " noise_type = \"diagonal\"\n", " sde_type = \"ito\"\n", "\n", - " def __init__(self, ode_drift, score, input_size=(3, 32, 32), sigma=1.):\n", + " def __init__(self, ode_drift, score, input_size=(3, 32, 32), sigma=1.0):\n", " super().__init__()\n", " self.drift = ode_drift\n", " self.score = score\n", @@ -154,6 +154,7 @@ " def g(self, t, y):\n", " return torch.ones_like(y) * self.sigma\n", "\n", + "\n", "sde = SDE(model, score_model, input_size=(2,), sigma=sigma)\n", "with torch.no_grad():\n", " sde_traj = torchsde.sdeint(\n", diff --git a/examples/notebooks/single-cell_example.ipynb b/examples/notebooks/single-cell_example.ipynb index 2a36c8d..f4ac00d 100644 --- a/examples/notebooks/single-cell_example.ipynb +++ b/examples/notebooks/single-cell_example.ipynb @@ -503,7 +503,7 @@ " noise_type = \"diagonal\"\n", " sde_type = \"ito\"\n", "\n", - " def __init__(self, ode_drift, score, input_size=(3, 32, 32), sigma=1.):\n", + " def __init__(self, ode_drift, score, input_size=(3, 32, 32), sigma=1.0):\n", " super().__init__()\n", " self.drift = ode_drift\n", " self.score = score\n", @@ -523,6 +523,7 @@ " def g(self, t, y):\n", " return torch.ones_like(y) * self.sigma\n", "\n", + "\n", "sde = SDE(sf2m_model, sf2m_score_model, input_size=(2,), sigma=sigma)\n", "with torch.no_grad():\n", " sde_traj = torchsde.sdeint(\n",