Spaces:
Running
Running
File size: 451 Bytes
8d7921b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import torch
import functools
if torch.__version__.startswith('0'):
from .sync_bn.inplace_abn.bn import InPlaceABNSync
BatchNorm2d = functools.partial(InPlaceABNSync, activation='none')
BatchNorm2d_class = InPlaceABNSync
relu_inplace = False
else:
BatchNorm2d_class = BatchNorm2d = torch.nn.SyncBatchNorm
relu_inplace = True
import torch
BatchNorm2d = torch.nn.BatchNorm2d
BatchNorm2d_class = BatchNorm2d
relu_inplace = False |