quantdata.torch.bbtorch#
Grid Sanos torch backbone
- class quantdata.torch.bbtorch.BackboneTorch(env='cpu')[source]#
Bases:
BackboneTorch compute backbone
- to_atomic(data, dtype=None)[source]#
Convert data to a scalar tensor. Stops gradient calculation if data is a tensor.
- to_array(data, dtype=None)[source]#
Create an array; do not copy if data is already an array of the correct dtype and on the correct device. Stops gradient calculation if data is a tensor
- verify(condition, message, exception=<class 'RuntimeError'>)[source]#
Verify a condition, raise an error with message if not satisfied.