|
|
@ -317,7 +317,7 @@ class RandomMixing(nn.Module):
|
|
|
|
x = x.reshape(B, H, W, C)
|
|
|
|
x = x.reshape(B, H, W, C)
|
|
|
|
return x
|
|
|
|
return x
|
|
|
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
class LayerNormGeneral(nn.Module):
|
|
|
|
class LayerNormGeneral(nn.Module):
|
|
|
|
r""" General LayerNorm for different situations.
|
|
|
|
r""" General LayerNorm for different situations.
|
|
|
|
|
|
|
|
|
|
|
@ -416,7 +416,7 @@ class LayerNormGeneral(nn.Module):
|
|
|
|
if self.use_bias:
|
|
|
|
if self.use_bias:
|
|
|
|
x = x + self.bias
|
|
|
|
x = x + self.bias
|
|
|
|
return x
|
|
|
|
return x
|
|
|
|
|
|
|
|
'''
|
|
|
|
class SepConv(nn.Module):
|
|
|
|
class SepConv(nn.Module):
|
|
|
|
r"""
|
|
|
|
r"""
|
|
|
|
Inverted separable convolution from MobileNetV2: https://arxiv.org/abs/1801.04381.
|
|
|
|
Inverted separable convolution from MobileNetV2: https://arxiv.org/abs/1801.04381.
|
|
|
|