-
Notifications
You must be signed in to change notification settings - Fork 7k
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
More datapoints docs and comments #7830
Conversation
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.
Just few comments otherwise looks good to me. Thanks!
# | ||
# You can re-wrap a pure tensor into a datapoint by just calling the datapoint | ||
# constructor, or by using the ``.wrap_like()`` class method (see more details | ||
# above in :ref:`datapoint_creation`): | ||
|
||
new_bboxes = bboxes + 3 | ||
new_bboxes = datapoints.BoundingBoxes.wrap_like(bboxes, new_bboxes) |
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.
non-blocking thought to reduce the number of chars to type, it could be simple to have bboxes.wrap_like(new_bboxes)
or bboxes.wrap_to(new_bboxes)
.
I think we already thought about that earlier but failed to get a good naming ...
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.
Yeah, I find it a bit long and clunky as well.
bboxes.wrap_to(new_bboxes).
That would be the best UX but unfortunately we can't do that because wrap_to
would have to be a method on pure Tensors.
We can implement instance methods on BBoxes objects, but I can't think of a good name either right now
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.
We have #7780 to go from BoundingBoxes
to BBoxes
. I'm somewhat against doing bboxes.wrap_like(...)
here, since it no longer makes it clear that this is a class and not instance method.
# | ||
# You can re-wrap a pure tensor into a datapoint by just calling the datapoint | ||
# constructor, or by using the ``.wrap_like()`` class method (see more details | ||
# above in :ref:`datapoint_creation`): | ||
|
||
new_bboxes = bboxes + 3 | ||
new_bboxes = datapoints.BoundingBoxes.wrap_like(bboxes, new_bboxes) |
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.
We have #7780 to go from BoundingBoxes
to BBoxes
. I'm somewhat against doing bboxes.wrap_like(...)
here, since it no longer makes it clear that this is a class and not instance method.
Co-authored-by: vfdev <vfdev.5@gmail.com>
Summary: Co-authored-by: vfdev <vfdev.5@gmail.com> Reviewed By: matteobettini Differential Revision: D48642271 fbshipit-source-id: 8982f6b16044a1f0877db664fc099b74049dcdff
No description provided.