Skip to content
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

[Tensorrt]: Cannot set value field in weight class #698

Closed
lpaatero opened this issue Mar 3, 2019 · 4 comments
Closed

[Tensorrt]: Cannot set value field in weight class #698

lpaatero opened this issue Mar 3, 2019 · 4 comments
Labels

Comments

@lpaatero
Copy link

lpaatero commented Mar 3, 2019

I am attempting to construct new network using tensorrt API.

When doing this, I have not been able to find any way to set values field in Weights class.
In particular, there is no values(Pointer) method in generated Weights java class.

Weights class in .h is defined as:

class Weights
{
public:
DataType type;
const void* values;
int64_t count;
};

This seems to prevent me from creating any network at all.

@saudet
Copy link
Member

saudet commented Mar 4, 2019

I see what the issue is. Adding the following to presets/nvinfer.java fixes this:

.put(new Info("nvinfer1::Weights::values").javaText("public native @Const Pointer values(); public native Weights values(Pointer values);"))

@saudet
Copy link
Member

saudet commented Mar 4, 2019

I've included the fix in commit 18a01ba. Please give it a try with 1.4.5-SNAPSHOT in a few hours when the builds are ready: http://bytedeco.org/builds/

@lpaatero
Copy link
Author

lpaatero commented Mar 4, 2019

Thanks for fast fix!
This solved the problem, I have got a toy example working.

@saudet
Copy link
Member

saudet commented Apr 11, 2019

Fix included in version 1.5. Thanks for reporting!

@saudet saudet closed this as completed Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants