Open ranjiewwen opened 3 years ago
when change the code in pycls/datasets/transforms.py , functions: random_sized_crop use torchvision aspect_ratio, training result is right !!! so different result from there ???
target_area = random.uniform(*(area_frac, 1.0)) * area
log_ratio = (math.log(3.0 / 4.0), math.log(4.0 / 3.0))
aspect_ratio = math.exp(random.uniform(*log_ratio))
# target_area = np.random.uniform(area_frac, 1.0) * area
# aspect_ratio = np.random.uniform(3.0 / 4.0, 4.0 / 3.0)
i my codebase to train regnetx_200m, i use this function 'random_sized_crop' in transform, while get bad result, train acc get 90%+, while val acc get 50%+
random_sized_crop(image, size=cfg.data.image_size, area_frac=0.08)
when i use torchvision method , training result is normal.
anyone meet this problem ? i see the source code diff below, i think this shouldn't make so big different.