File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cellseg_models_pytorch/losses Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import torch
22import torch .nn as nn
33
4- from .. utils import filter2D , gaussian_kernel2d
4+ from cellseg_models_pytorch . utils . convolve import filter2D , gaussian_kernel2d
55
66
77class WeightedBaseLoss (nn .Module ):
@@ -13,7 +13,7 @@ def __init__(
1313 apply_mask : bool = False ,
1414 class_weights : torch .Tensor = None ,
1515 edge_weight : float = None ,
16- ** kwargs
16+ ** kwargs ,
1717 ) -> None :
1818 """Init a base class for weighted cross entropy based losses.
1919
@@ -99,7 +99,7 @@ def apply_svls_to_target(
9999 num_classes : int ,
100100 kernel_size : int = 5 ,
101101 sigma : int = 3 ,
102- ** kwargs
102+ ** kwargs ,
103103 ) -> torch .Tensor :
104104 """Apply spatially varying label smoothihng to target map.
105105
You can’t perform that action at this time.
0 commit comments