Skip to content

Commit

Permalink
[Bug: 839] Crop in SSPCAB implementation (#1057)
Browse files Browse the repository at this point in the history
* [Bug: 839] Crop in SSPCAB implementation
This fix follows the official implementation for the SSPCAB by the original author

Fixes #839

Signed-off-by: Ng, Kin Nam <kin.nam.ng@intel.com>
Signed-off-by: Lim, Kuan Xian <kuan.xian.lim@intel.com>

* remove trailing whitespace

* [Bug: 839] Crop in SSPCAB implementation
This fix follows the official implementation for the SSPCAB by the original author

Fixes #839

Signed-off-by: Ng, Kin Nam <kin.nam.ng@intel.com>
Signed-off-by: Lim, Kuan Xian <kuan.xian.lim@intel.com>

remove trailing whitespace

---------

Signed-off-by: Ng, Kin Nam <kin.nam.ng@intel.com>
Signed-off-by: Lim, Kuan Xian <kuan.xian.lim@intel.com>
  • Loading branch information
isaacncz committed Apr 28, 2023
1 parent d81dbb5 commit eadb75a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anomalib/models/components/layers/sspcab.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, in_channels: int, kernel_size: int = 1, dilation: int = 1, re
super().__init__()

self.pad = kernel_size + dilation
self.crop = 2 * (kernel_size + dilation)
self.crop = kernel_size + 2 * dilation + 1

self.masked_conv1 = nn.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size)
self.masked_conv2 = nn.Conv2d(in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size)
Expand Down

0 comments on commit eadb75a

Please sign in to comment.