DDMixin

class DDMixin(*args, **kwargs)[source]

Bases: DDProtocol

Diffusion data mixin for common functionality.

clone() Self[source]
detach() Self[source]

Return a new instance detached from the current computation graph.

property device: device
gradient(outputs: Tensor, create_graph: bool = False, retain_graph: bool = False) Self[source]

Compute the gradient of output w.r.t. self.

Returns: An instance of Self containing the gradients.

ones_like() Self[source]
randn_like() Self[source]
requires_grad(mode: bool = True) Self[source]

In-place operation to start recording operations for autograd.

to(device: device | str) Self[source]
zeros_like() Self[source]