/mnt/home/wbroderick/plenoptic/src/plenoptic/synthesize/synthesis.py:211: UserWarning: model has no `to` method, so we leave it as is...
warnings.warn("model has no `to` method, so we leave it as is...")
which should only happen if caling met.model.to raises an AttributeError`, which it doesn't.
Confusingly, met.model(met.metamer) works after this.
However, running met.synthesize() after the aboveraises ValueError: can't optimize a non-leaf Tensor, so something gets messed up with the optimizer.
I think the proper way to do this is to make use of register_buffer or similar, and then remove our definition of def to(), like we've done for the PortillaSimoncelli and SteerablePyramid modules.
Running the following produces unexpected behavior:
This raises the following warning:
which should only happen if caling
met.model.to
raises an AttributeError`, which it doesn't.Confusingly,
met.model(met.metamer)
works after this.However, running
met.synthesize()
after the aboveraisesValueError: can't optimize a non-leaf Tensor
, so something gets messed up with the optimizer.I think the proper way to do this is to make use of
register_buffer
or similar, and then remove our definition ofdef to()
, like we've done for thePortillaSimoncelli
andSteerablePyramid
modules.