PARCtorch package

Subpackages

Submodules

PARCtorch.PARCv2 module

class PARCtorch.PARCv2.PARCv2(differentiator, integrator, loss, **kwargs)

Bases: Module

forward(ic, t0, t1)

Forward of PARCv2. Essentially a call to the integrator with the differentiator.

Args ic (torch.tensor): 4-d tensor of Float with shape (batch_size, channels, y, x), initial condition. t0 (float): starting time of the initial condition t1 (torch.tensor): 1-d tensor of Float with shape (ts), time point that PARCv2 will predict on

Returns res (torch.tensor): 5-d tnsor of Float with the shape of (ts, batch_size, channels, y, x), predicted sequences at each time point in t1

freeze_differentiator()

A convenient function to freeze the differentiator

Args

Module contents