(net, inputs)
return blob_dict,tracked_layers
analyse the network given input
    :param net: torch.nn.Module
    :param inputs: torch.Variable, torch.Tensor or list of them
    :return: blob_dict, tracked_layers
analyse the network given input
    :param net: torch.nn.Module
    :param inputs: torch.Variable, torch.Tensor or list of them
    :return: blob_dict, tracked_layers
analyse the network given input : param net : torch . nn . Module : param inputs : torch . Variable torch . Tensor or list of them : return : blob_dict tracked_layers
def analyse(net, inputs):
    """
    analyse the network given input
    :param net: torch.nn.Module
    :param inputs: torch.Variable, torch.Tensor or list of them
    :return: blob_dict, tracked_layers
    """
    del tracked_layers[:]
    del blob_dict[:]
    if not isinstance(inputs,(list,tuple)):
        raw_inputs=[inputs]
    else:
        raw_inputs=inputs
    _inputs=[]
    for name,layer in net.named_modules():
        layer_name_dict[layer]=name
    for i in raw_inputs:
        if isinstance(i,Variable):
            _inputs.append(i)
        elif isinstance(i,torch.Tensor):
            _inputs.append(Variable(i))
        elif isinstance(i,np.ndarray):
            _inputs.append(Variable(torch.Tensor(i)))
        else:
            raise NotImplementedError("Not Support the input type {}".format(type(i)))
    net.apply(register)
    net.forward(*_inputs)
    for _,m in net.named_modules():
        m._forward_hooks.clear()
    print_by_layers(tracked_layers)
    return blob_dict,tracked_layers
def analyse ( net , inputs ) : del tracked_layers [ : ] del blob_dict [ : ] if not isinstance ( inputs , ( list , tuple ) ) : raw_inputs = [ inputs ] else : raw_inputs = inputs _inputs = [ ] for name , layer in net . named_modules ( ) : layer_name_dict [ layer ] = name for i in raw_inputs : if isinstance ( i , Variable ) : _inputs . append ( i ) elif isinstance ( i , torch . Tensor ) : _inputs . append ( Variable ( i ) ) elif isinstance ( i , np . ndarray ) : _inputs . append ( Variable ( torch . Tensor ( i ) ) ) else : raise NotImplementedError ( "Not Support the input type {}" . format ( type ( i ) ) ) net . apply ( register ) net . forward ( * _inputs ) for _ , m in net . named_modules ( ) : m . _forward_hooks . clear ( ) print_by_layers ( tracked_layers ) return blob_dict , tracked_layers