(axis)
return {0: 0, 1: 2, 2: 3, 3: 1}.get(axis)
Translate Tensorflow 'axis' to corresponding PyTorch 'dim
Translate Tensorflow 'axis' to corresponding PyTorch 'dim
Translate Tensorflow axis to corresponding PyTorch dim
def _axis_to_dim(axis):
    """Translate Tensorflow 'axis' to corresponding PyTorch 'dim'"""
    return {0: 0, 1: 2, 2: 3, 3: 1}.get(axis)
def _axis_to_dim ( axis ) : return { 0 : 0 , 1 : 2 , 2 : 3 , 3 : 1 } . get ( axis )