Spaces:
Running on Zero
Running on Zero
File size: 468 Bytes
f0395ef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from abc import ABCMeta, abstractmethod
class BasePolicy(metaclass=ABCMeta):
@abstractmethod
def pi(self, x_t, sigma_t):
"""Compute the flow velocity at (x_t, t).
Args:
x_t (torch.Tensor): Noisy input at time t.
sigma_t (torch.Tensor): Noise level at time t.
Returns:
torch.Tensor: The computed flow velocity u_t.
"""
pass
@abstractmethod
def detach(self):
pass
|