ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.16k stars 308 forks source link

Do you have any plan to support the optional shape argument? #64

Closed chiraggirdhar95 closed 5 years ago

chiraggirdhar95 commented 6 years ago

Hi, I am trying to add changes to the TFParser for few more ops (Eg.Fill) but this is not possible as the input shape argument is not Const for this op in my model. Do you have any plans to introduce support for such type of operations?

MatthewARM commented 6 years ago

Hi @chiraggirdhar95 in the current version of ArmNN tensor shapes do need to be constant.

We've been thinking about a way of adding support for dynamically sizing fully-convolutional networks, e.g. for filters, but I don't know whether this would fit with your needs. Could you share a bit more information about your use case?

All the best, Matthew

chiraggirdhar95 commented 6 years ago

Hi @MatthewARM, I want to add changes to the Tfparser to support Fill operation(https://www.tensorflow.org/api_docs/python/tf/fill) which takes 2 arguments 1)scalar 2)shape. So the shape argument for the node Fill in my model will be fed from another node's output in the graph. So while adding changes in the TfParser how should I define changes using the current functionalities. For eg how should I set outputTensorInfo which depends on shape argument whose value is not known.

MatthewARM commented 5 years ago

Hi @chiraggirdhar95 if the shape can be calculated statically from the model, you should be fine handling this with code in the parser, by calculating the shape and passing it to the fill node as a constant. If your model genuinely needs ArmNN tensors with dynamic shapes that change based on the input, I'm afraid that can't be supported at this time.

MatthewARM commented 5 years ago

Closing this issue as the original question has been answered. @chiraggirdhar95 if you can let us know more about whether dynamic tensor shapes are required in your use-case, please get back in touch and we'll add it to our roadmap.

Many thanks, Matthew