Module phi.torch.flow
Standard import for PyTorch mode.
Extends the import from phi.flow import *
by PyTorch-related functions and modules.
The following PyTorch modules are included: torch
, torch.nn.functional as torchf
, optim
.
Importing this module registers the PyTorch backend as the default backend unless called within a backend context.
New tensors created via phiml.math
functions will be backed by PyTorch tensors.
See phi.flow
, phi.tf.flow
, phi.jax.flow
.