chore: ruff

Looks like an upstream change to ruff resulted in this file being a violation.
This commit is contained in:
psychedelicious 2024-07-15 13:02:08 +10:00
parent d7d59d704b
commit 28e79c4c5e

View File

@ -98,7 +98,7 @@ class UnetSkipConnectionBlock(nn.Module):
""" """
super(UnetSkipConnectionBlock, self).__init__() super(UnetSkipConnectionBlock, self).__init__()
self.outermost = outermost self.outermost = outermost
if type(norm_layer) == functools.partial: if isinstance(norm_layer, functools.partial):
use_bias = norm_layer.func == nn.InstanceNorm2d use_bias = norm_layer.func == nn.InstanceNorm2d
else: else:
use_bias = norm_layer == nn.InstanceNorm2d use_bias = norm_layer == nn.InstanceNorm2d