(z:Tensor, cond:Tensor)
| 147 | |
| 148 | @TinyJit |
| 149 | def sample(z:Tensor, cond:Tensor) -> Tensor: |
| 150 | return model.sample(z, cond, Tensor.full_like(cond, 10), sample_steps=getenv("SAMPLE_STEPS", 20))[-1] |
| 151 | |
| 152 | for steps in (t:=trange(getenv("STEPS", 5000))): |
| 153 | if steps%10 == 0: mviz(sample(Tensor.randn(3, 1, 32, 32), Tensor([5,0,4], dtype='int'))) |