pyanomaly/core/utils.py
def modeldist(model):
    '''
    To make the model in dist
    '''
    assert torch.distributed.is_initialized(), 'Not init the dist'
    if isinstance(model, OrderedDict):
        print('The model is OrderedDict')
    elif isinstance(model, torch.nn.Module):
        print('The model is nn.Module')
    else:
        raise Exception('Not support the model')

    To make the model in dist
    
To make the model in dist
To make the model in dist
def modeldist(model):
    assert torch.distributed.is_initialized(), 'Not init the dist'
    if isinstance(model, OrderedDict):
        print('The model is OrderedDict')
    elif isinstance(model, torch.nn.Module):
        print('The model is nn.Module')
    else:
        raise Exception('Not support the model')
def modeldist ( model ) : assert torch . distributed . is_initialized ( ) , 'Not init the dist' if isinstance ( model , OrderedDict ) : print ( 'The model is OrderedDict' ) elif isinstance ( model , torch . nn . Module ) : print ( 'The model is nn.Module' ) else : raise Exception ( 'Not support the model' )
To make the model in dist
To make the model in dist
'''
    To make the model in dist
    '''
model