jactorch.vision.smooth#

Classes

Functions

gaussian_smooth(image, kernel_size, sigma[, ...])

gaussian_smooth_truncated(image, sigma[, ...])

maximum_smooth(image, kernel_size[, border_mode])

normalized_box_smooth(image, kernel_size[, ...])

Class GaussianSmooth

class GaussianSmooth[source]#

Bases: CustomKernel

__init__(kernel_size, sigma, border_mode='reflect')[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define 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.

Class GaussianSmoothTruncated

class GaussianSmoothTruncated[source]#

Bases: GaussianSmooth

__init__(sigma, truncate=4, border_mode='reflect')[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define 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.

Class MaximumSmooth

class MaximumSmooth[source]#

Bases: CustomKernel

__init__(kernel_size, border_mode='reflect')[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define 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.

Class NormalizedBoxSmooth

class NormalizedBoxSmooth[source]#

Bases: CustomKernel

__init__(kernel_size, border_mode='reflect')[source]#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(input)#

Define 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.

Functions

gaussian_smooth(image, kernel_size, sigma, border_mode='reflect')[source]#
gaussian_smooth_truncated(image, sigma, truncate=4, border_mode='reflect')[source]#
maximum_smooth(image, kernel_size, border_mode='reflect')[source]#
normalized_box_smooth(image, kernel_size, border_mode='reflect')[source]#