def tfms_from_model(f_model, sz, aug_tfms=None, max_zoom=None, pad=0, crop_type=CropType.RANDOM,
                    tfm_y=None, sz_y=None, pad_mode=cv2.BORDER_REFLECT, norm_y=True, scale=None):
    """ Returns separate transformers of images for training and validation.
    Transformers are constructed according to the image statistics given by the model. (See tfms_from_stats)

    Arguments:
        f_model: model, pretrained or not pretrained
    """
    stats = inception_stats if f_model in inception_models else imagenet_stats
    return tfms_from_stats(stats, sz, aug_tfms, max_zoom=max_zoom, pad=pad, crop_type=crop_type,
                           tfm_y=tfm_y, sz_y=sz_y, pad_mode=pad_mode, norm_y=norm_y, scale=scale)
def tfms_from_model ( f_model , sz , aug_tfms = None , max_zoom = None , pad = 0 , crop_type = CropType . RANDOM , tfm_y = None , sz_y = None , pad_mode = cv2 . BORDER_REFLECT , norm_y = True , scale = None ) : stats = inception_stats if f_model in inception_models else imagenet_stats return tfms_from_stats ( stats , sz , aug_tfms , max_zoom = max_zoom , pad = pad , crop_type = crop_type , tfm_y = tfm_y , sz_y = sz_y , pad_mode = pad_mode , norm_y = norm_y , scale = scale )
Returns separate transformers of images for training and validation.
    Transformers are constructed according to the image statistics given by the model. (See tfms_from_stats)

    Arguments:
        f_model: model, pretrained or not pretrained