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

[bug] javacpp -pytorch all cpp enum class can not get really value ,need give then get() method or toString to return really enum value #1591

Open
mullerhai opened this issue Mar 7, 2025 · 5 comments

Comments

@mullerhai
Copy link

Hi ,
@saudet ,I found all javacpp enum class can not get it really value ,Like
UpsampleMode EmbeddingBagMode RNNNonlinearity PaddingMode TransformerActivation these class have get0() get1() but not to get really value

@saudet
Copy link
Member

saudet commented Mar 8, 2025

What kind of "value" are you looking for?

@mullerhai
Copy link
Author

What kind of "value" are you looking for?
I don't know these enum class inner logic ,in java /scala almost could view the enum really select value , maybe String or Object or something .
in Idea debug ,I want to debug the value of javacpp -pytorch ,but the layer and options can not view the fields value and method return value ,maybe they are wrapped by Pointer ,we need universal deal them to get really value ,thanks

@saudet
Copy link
Member

saudet commented Mar 8, 2025

Unfortunately, those classes do not have any values...

@mullerhai
Copy link
Author

Unfortunately, those classes do not have any values...

so could javacpp collect same value from them pre them value set

@mullerhai
Copy link
Author

for most javacpp Object is wrapper so deeply , debug mode only see like that [org.bytedeco.pytorch.UpsampleMode[address=0x1cb5a739640,position=0,limit=0,capacity=0,deallocator=null]
] ,it is make developer confuse ,we need to UnWrapper them ,please show me the how to UnWrapper ,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants