Imagenet_train/timm/models/operations.py
def build_upsample_neg_stride(self, name=None, stride=None, **kwargs):
        """ Use negative stride to represent scales, i.e., stride=-2 means scale=2
            Return upsample op if the stride is negative, return None otherwise
            Reset and return the stride to 1 if it is negative
        """
        if name is None:
            return None, stride

        if isinstance(stride, numbers.Number):
            if stride > 0:
                return None, stride
            stride = (stride, stride)
        assert isinstance(stride, (tuple, list))

        neg_strides = all(x < 0 for x in stride)
        if not neg_strides:
            return None, stride

        scales = [-x for x in stride]
        if name == "default":
            ret = Upsample(scale_factor=scales, **kwargs)
        else:
            ret = None
        return ret, 1
 Use negative stride to represent scales, i.e., stride=-2 means scale=2
            Return upsample op if the stride is negative, return None otherwise
            Reset and return the stride to 1 if it is negative
        
Use negative stride to represent scales, i.e., stride=-2 means scale=2
Return upsample op if the stride is negative, return None otherwise
Reset and return the stride to 1 if it is negative
Use negative stride to represent scales i . e . stride = - 2 means scale = 2 Return upsample op if the stride is negative return None otherwise Reset and return the stride to 1 if it is negative
def build_upsample_neg_stride(self, name=None, stride=None, **kwargs):
        if name is None:
            return None, stride
        if isinstance(stride, numbers.Number):
            if stride > 0:
                return None, stride
            stride = (stride, stride)
        assert isinstance(stride, (tuple, list))
        neg_strides = all(x < 0 for x in stride)
        if not neg_strides:
            return None, stride
        scales = [-x for x in stride]
        if name == "default":
            ret = Upsample(scale_factor=scales, **kwargs)
        else:
            ret = None
        return ret, 1
def build_upsample_neg_stride ( self , name = None , stride = None , ** kwargs ) : if name is None : return None , stride if isinstance ( stride , numbers . Number ) : if stride > 0 : return None , stride stride = ( stride , stride ) assert isinstance ( stride , ( tuple , list ) ) neg_strides = all ( x < 0 for x in stride ) if not neg_strides : return None , stride scales = [ - x for x in stride ] if name == "default" : ret = Upsample ( scale_factor = scales , ** kwargs ) else : ret = None return ret , 1
Use negative stride to represent scales, i.e., stride=-2 means scale=2
Return upsample op if the stride is negative, return None otherwise
Reset and return the stride to 1 if it is negative
Use negative stride to represent scales i . e . stride = - 2 means scale = 2 Return upsample op if the stride is negative return None otherwise Reset and return the stride to 1 if it is negative
""" Use negative stride to represent scales, i.e., stride=-2 means scale=2
            Return upsample op if the stride is negative, return None otherwise
            Reset and return the stride to 1 if it is negative
        """
self
name
stride