-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refine_flowvision #216
base: main
Are you sure you want to change the base?
refine_flowvision #216
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ def one_hot(x, num_classes, on_value=1.0, off_value=0.0, device="cuda"): | |
|
||
def mixup_target(target, num_classes, lam=1.0, smoothing=0.0, device="cuda"): | ||
""" | ||
Mixup the targets with label-smoothing | ||
Mixes up the targets with label-smoothing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这边用 |
||
""" | ||
off_value = smoothing / num_classes | ||
on_value = 1.0 - smoothing + off_value | ||
|
@@ -39,7 +39,7 @@ def mixup_target(target, num_classes, lam=1.0, smoothing=0.0, device="cuda"): | |
|
||
def rand_bbox(img_shape, lam, margin=0.0, count=None): | ||
""" Standard CutMix bounding-box | ||
Generates a random square bbox based on lambda value. This impl includes | ||
generates a random square bbox based on lambda value. This implementation includes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个开头需要大写,和上面那个不算同一行, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 收到,已修改 |
||
support for enforcing a border margin as percent of bbox dimensions. | ||
|
||
Args: | ||
|
@@ -90,7 +90,7 @@ def rand_bbox_minmax(img_shape, minmax, count=None): | |
def cutmix_bbox_and_lam( | ||
img_shape, lam, ratio_minmax=None, correct_lam=True, count=None | ||
): | ||
""" Generate bbox and apply lambda correction. | ||
""" Generates bbox and apply lambda correction. | ||
""" | ||
if ratio_minmax is not None: | ||
yl, yu, xl, xu = rand_bbox_minmax(img_shape, ratio_minmax, count=count) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这边需要Creates吗2333,我怎么感觉貌似Create就行了