Skip to content

Commit 2f47b5a

Browse files
author
Andrey Voynov
committed
normalizing flow toy distribution name fix
1 parent 7bd03d3 commit 2f47b5a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

seminar06-gen_models_1/gen_day_1.ipynb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -566,22 +566,17 @@
566566
}
567567
],
568568
"source": [
569-
"class Rectangle():\n",
570-
" def __init__(self, w, h, center):\n",
571-
" self.w = w\n",
572-
" self.h = h\n",
569+
"class Circle():\n",
570+
" def __init__(self, center):\n",
573571
" self.center = center\n",
574572
"\n",
575573
" def __call__(self, size):\n",
576574
" n = torch.randn([size, 2])\n",
577575
" n = n / n.norm(dim=-1).unsqueeze(1)\n",
578576
" return n + self.center + 0.1 * torch.randn([size, 2])\n",
579-
"# x = self.w * torch.rand([size, 1])\n",
580-
"# y = self.h * torch.rand([size, 1])\n",
581-
"# return torch.cat([x, y], dim=1) + self.center\n",
582577
"\n",
583578
"\n",
584-
"distribution = Rectangle(1, 4, torch.tensor([4, 4]))\n",
579+
"distribution = Circle(torch.tensor([4, 4]))\n",
585580
"ys = distribution(1024)\n",
586581
"\n",
587582
"nf = NormalizingFlow(\n",

0 commit comments

Comments
 (0)