-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
The attributes of Slice #3686
Comments
Hi @ZJG0, |
Thanks for your reply. I printed the information of node
Above |
The input position is fixed -- Since your Slice node has 4 inputs, they respectively are data(3020), starts(3029), ends(3030), axes(3028), with the same order as the document. |
I may not describe my problem clearly. I don't understand the format of input. For example, Does axis(3028) mean the value of axis is 3028?Shouldn't axis be 0 or 1? |
I thought you printed the Slice node info by |
Yes. However, how can i get the value of axis based on name "3028"? I try to print input info by
|
All I need is that the real values of
|
If you didn't find those input names of Slice node in your graph.initializer/graph.input, they are probably produced while forwarding the graph... That is to say, they are not static and their values can only obtained during runtime (giving inputs and going through the graph). |
Just to clarify: "210" here is the name of a tensor. You can check whether there is an initializer with that name, which will provide the value. If not, there must be some node with an output named "210". If it is a "Constant" node, then the value can be obtained from that node's attributes. Otherwise, it is probably computed at runtime, and so a value cannot be determined statically. |
Hi. What a coincidence. I got the same problem when I used CrypTen. The reason why I cause the problem is I also change opset_operation into 11. |
Ask a Question
Question
When opset version<=9 the node of
Slice
haveattribute
which storesstarts
,end
andaxis
. However, opset version >9there isn't
attribute
, how can I get the value ofstarts
,ends
andaxis
?Further information
I intend to convert
onnx
format ofViT
model toCrypten
. There isa error about
Slice
whose cause is thatCrypten
requires 'starts',ends
andaxis
ofSlice
, but opset version>9onnx
doesn't haveattribute
, I can't find thestarts
etc.Is this issue related to a specific model?
Model name (e.g. mnist): ViT model and Crypten
Model opset (e.g. 7): opset version>=10
Notes
Any additional information, code snippets.
The text was updated successfully, but these errors were encountered: