-
Notifications
You must be signed in to change notification settings - Fork 189
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
#790 Add Ops\Boxes #867
#790 Add Ops\Boxes #867
Conversation
return NULL; | ||
} | ||
#else | ||
lib = dlopen((libName + ".so").c_str(), RTLD_LAZY); |
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.
This won't work on Mac, I believe. There, it's '.dylib'
@@ -2754,7 +2754,14 @@ public static Tensor einsum(string equation, params Tensor[] tensors) | |||
/// </summary> | |||
/// <param name="input">The first input tensor</param> | |||
/// <param name="other">The second input tensor</param> | |||
public static Tensor maximum(Tensor input, Tensor other) => input.maximum(other); | |||
public static Tensor max(Tensor input, Tensor other) => maximum(input, other); |
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.
I don't think 'max' and 'maximum' are aliases of each other.
https://pytorch.org/docs/stable/generated/torch.max.html?highlight=max#torch.max
https://pytorch.org/docs/stable/generated/torch.maximum.html?highlight=maximum#torch.maximum
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.
there is an overload at the bottom of the 'max‘ page
torch.max(input, other, *, out=None) → Tensor
See torch.maximum().
@@ -2797,7 +2804,14 @@ public static Tensor einsum(string equation, params Tensor[] tensors) | |||
/// </summary> | |||
/// <param name="input">The first input tensor</param> | |||
/// <param name="other">The second input tensor</param> | |||
public static Tensor minimum(Tensor input, Tensor other) => input.minimum(other); | |||
public static Tensor min(Tensor input, Tensor other) => minimum(input, other); |
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.
See comment on 'max'
/// </summary> | ||
public static class DeconstructExtension | ||
{ | ||
public static void Deconstruct<T>(this IEnumerable<T> seq, out T first, out IEnumerable<T> rest) |
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.
Doc comments on all public APIs, please.
@@ -20,7 +20,7 @@ public void NMS_OneBox() | |||
}); | |||
var scores = torch.from_array(new[] { 0.9 }); | |||
|
|||
var nms_boxes = nms(boxes, scores); | |||
var nms_boxes = nms_custom(boxes, scores); |
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.
This means there's no unit test for 'nms' -- please add one.
@huangyangyu -- can you take a look at this PR? You added the C# implementation of 'nms' |
I'm curious about libtorchvision.dll -- you uploaded it to Google drive, but we'll have to come up with a more automated way of building it. |
I'm wondering if it wouldn't be more convenient, in the long run to just add torchvision (and audio, and text) as linked projects and build the native code into our native project. |
@NiklasGustafsson it will be great if it's possible to build torchvision automatically, but currently I cannot find a way to do it. |
Currently my branch is a mess, I'll consider create pull request later. |
Add nms method from torch vision.
Build torchvision dll from source and rename to "libtorchvision", put it and all dependencies to the same path of exe file.
Tested on windows, the dll uploaded to https://drive.google.com/drive/folders/14R6_HzDEOlespcOd6pAWYgxjoYjD1Xpz?usp=share_link
command to build torch vision: