Why do I get the following error when I follow the tutorial tutorial.ipynb step by step:
AssertionError Traceback (most recent call last)
Cell In[9], line 3
1 for it in range(n_steps):
2 params.update(opt)
----> 3 img = mi.render(scene, params, integrator=integrator, spp=spp, spp_grad=spp_grad, seed=it)
4 # L1 loss
5 loss = dr.mean(dr.abs(img - ref_img))
File D:\Anaconda3\Lib\site-packages\mitsuba\python\util.py:522, in render(scene, params, sensor, integrator, seed, seed_grad, spp, spp_grad)
518 elif seed_grad == seed:
519 raise Exception('The primal and differential seed should be different '
520 'to ensure unbiased gradient computation!')
--> 522 return dr.custom(_RenderOp, scene, sensor, params, integrator,
523 (seed, seed_grad), (spp, spp_grad))
File D:\Anaconda3\Lib\site-packages\drjit\router.py:5776, in custom(cls, *args, *kwargs)
5774 output = inst.eval(_dr.detach(kwargs['args']))
5775 else:
-> 5776 output = inst.eval(**{ k: _dr.detach(v) for k, v in kwargs.items() })
5777 if _dr.grad_enabled(output):
5778 raise RuntimeError("drjit.custom(): the return value of CustomOp.eval() "
5779 "should not be attached to the AD graph!")
Why do I get the following error when I follow the tutorial tutorial.ipynb step by step: AssertionError Traceback (most recent call last) Cell In[9], line 3 1 for it in range(n_steps): 2 params.update(opt) ----> 3 img = mi.render(scene, params, integrator=integrator, spp=spp, spp_grad=spp_grad, seed=it) 4 # L1 loss 5 loss = dr.mean(dr.abs(img - ref_img))
File D:\Anaconda3\Lib\site-packages\mitsuba\python\util.py:522, in render(scene, params, sensor, integrator, seed, seed_grad, spp, spp_grad) 518 elif seed_grad == seed: 519 raise Exception('The primal and differential seed should be different ' 520 'to ensure unbiased gradient computation!') --> 522 return dr.custom(_RenderOp, scene, sensor, params, integrator, 523 (seed, seed_grad), (spp, spp_grad))
File D:\Anaconda3\Lib\site-packages\drjit\router.py:5776, in custom(cls, *args, *kwargs) 5774 output = inst.eval(_dr.detach(kwargs['args'])) 5775 else: -> 5776 output = inst.eval(**{ k: _dr.detach(v) for k, v in kwargs.items() }) 5777 if _dr.grad_enabled(output): 5778 raise RuntimeError("drjit.custom(): the return value of CustomOp.eval() " 5779 "should not be attached to the AD graph!")
File D:\Anaconda3\Lib\site-packages\mitsuba\python\util.py:377, in _RenderOp.eval(self, scene, sensor, params, integrator, seed, spp) 374 self.spp = spp 376 with dr.suspend_grad(): --> 377 return self.integrator.render( 378 scene=self.scene, 379 sensor=sensor, 380 seed=seed[0], 381 spp=spp[0], 382 develop=True, 383 evaluate=False 384 )
File D:\Wxr/render/differentiable/recursive_control_variates\plugins\cv_integrator.py:55, in CVIntegrator.render(self, scene, sensor, seed, spp, develop, evaluate) 47 def render(self: mi.SamplingIntegrator, 48 scene: mi.Scene, 49 sensor: int = 0, # WARN: this could also be an object, but we don't support it (...) 52 develop: bool = True, 53 evaluate: bool = True) -> mi.TensorXf: ---> 55 assert isinstance(sensor, int) 56 self.init_buffers() 58 self.H, self.F = self.integrator.render_twostates(scene, sensor, seed, spp)
AssertionError: