Problem abput inplace_abn setup
666shaw opened this issue · comments
when I tried to set up the inplace_abn, it warmed me up that 'your setuptools is too old (<12)
,setuptools_scm functionality is degraded'. I do not how to deal with this problem. If you have any ideas, please tell me! Thank you!!!
Here are my settings:
ninja =1.10.2.3
pytorch =1.7.1
I though the author had given the answer in the .py file in models->bn_helpers.py, as follow:
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