Binary Operators

Affine Currents

class AffineCurrents(tar_normals, tar_centers, sigma, init_affine=None, init_translation=None, kernel='cauchy', device='cpu', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

static Create(tar_normals, tar_centers, sigma, init_affine=None, init_translation=None, kernel='cauchy', device='cpu', dtype=torch.float32)[source]
forward(src_normals, src_centers)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Currents Energy Filter

class CurrentsEnergy(tar_normals, tar_centers, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

static Create(tar_normals, tar_centers, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]
static cauchy(d, sigma)[source]
static colordiff(src_colors, tar_colors)[source]
static distance(src_centers, tar_centers)[source]
forward(src_normals, src_centers, tar_normals, tar_centers)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

static gaussian(d, sigma)[source]

Deformable Currents Filter

class DeformableCurrents(src_surface, tar_surface, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

static Create(src_surface, tar_surface, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]
forward()[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Single Angle Affine Currents Filter

class SingleAngleCurrents(tar_normals, tar_centers, sigma, init_angle=None, init_translation=None, kernel='cauchy', device='cpu', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

static Create(tar_normals, tar_centers, sigma, init_angle=None, init_translation=None, kernel='cauchy', device='cpu', dtype=torch.float32)[source]
build_matrix()[source]
forward(src_normals, src_centers)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Stitching Currents Filter

class StitchingCurrents(src_surface, tar_surface, reference_surface, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]

Bases: torch.nn.modules.module.Module

static Create(src_surface, tar_surface, ref_surface, sigma, kernel='cauchy', device='cpu', dtype=torch.float32)[source]
static cauchy(d, sigma)[source]
static distance(src_centers, tar_centers)[source]
energy(src_normals, src_centers, tar_normals, tar_centers)[source]
forward()[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

static gaussian(d, sigma)[source]