oreoloans.blogg.se

Tensorflow permute dimensions
Tensorflow permute dimensions





tensorflow permute dimensions

So, how can I achieve the desired result? Basically which axes should I interchange? I have made some experiments but I cannot seem to find the right one. Which obviously does not change the input data at all. Model = models.Model(inputs=, outputs=permuted_x) Permuted_x = channel_shuffle4(image_input) M = K.concatenate((l, l))Ī keras non working implementation is below: def channel_shuffle(x): Also, I am not sure if the concatenate version is slower (if someone can answer this one I would be grateful).Ī working tensorflow implementation using concatenate(): import tensorflow as tfĪ = tf.constant(,, ],, , ]]]) I have managed to do it with concatenate() but I would like an implementation using permute_dimensions(). I have found this implementation but it seems to be wrong because I think it's based on this pytorch implementation. In any case, if I find a better solution I'll let you know.I am trying to implement in tensorflow (or keras) a channel shuffle function. However, it didn't solve my slow performance issue. Thanks a lot! I managed to do it the same way you did and it worked. Usually either a Variable or ResourceVariable instance. For more details, see the documentation of tf.getvariable and the 'Variable Partitioners and Sharding' section of the API guide. If you find another solution for the problem, would you please share it to me? Thank you so much. Available partitioners include tf.fixedsizepartitioner and tf.variableaxissizepartitioner. Therefore, I have to fix the xml file manually. Therefore, I manually edited the xml file as following:Īctually, I can't find the python file that custom layers and add the permute operation it in model_optimizer folder. I will post here when I find out more info.Īs the Shubha's advise in the previous comment, we need to add 2 reshape layer before and after the Permute layer. I will send the IR xml file to experts within the development team. Can you attach the xml file here which has the TensorIterator error ? I will file a bug for you. Now I need to file another about the CPU documentation being inaccurate. So first, I have already filed a bug about the original problem for you.

tensorflow permute dimensions

At least the Myriad document tells the truth about the "TensorIterator" primitive not being supported. When you get that error Unsupported primitive of type: it means that the operation does not exist in the model optimizer (and likely it doesn't exist at the Inference Engine too). I'm terribly sorry that you're having such problems even on CPU. It's entirely a Model Optimizer-to-Inference Engine function. You are right - you will not find anything related to this in Tensorflow. is a function which Model Optimizer uses to define rules for layout conversation to make Inference Engine happy. Is it related to bug of Inferences Engine?Ĭould you please tell me what did you do exactly to solve the Permute error? I am still trying to solve this so I would really appreciate your feedback.ĭear quyet, PermuteAttrs.create_permute_attrs(node, attrs=). But, i got the error Unsupported primitive of type: TensorIterator name: bidirectional_1/while/LoopCond/TensorIteratorCondition_/TensorIterator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

#TENSORFLOW PERMUTE DIMENSIONS CODE#

In addition, in the document said that the TensorIterator was supported by Inferences Engine in CPU. The following are 20 code examples of (). Can I do something to figure the error or wait the new release of Openvino toolkit?. I guess that the TensorIterator layer was unsupported by Inferences Engine in Neural Compute Stick as the document. Cannot convert layer "bidirectional_1/while/LoopCond/TensorIteratorCondition_/TensorIterator" due to unsupported layer type "TensorIterator" I manually edited the xml file and figure out the problems with Permute operation in Neural compute stick2. Thank you so much for your close support. I searched about PermuteAttrs.create_permute_attrs(node, attrs=) in google but i can not find any documents about it. In my tensorflow graph, therer is not any Permute operation after the Squeeze operation. And I do not understand where you can add the Permute operation after the Squeeze operation. But i do not find the command add Permute layer in the python file except the command PermuteAttrs.create_permute_attrs(node, attrs=). Therefore, I try to edit by rewrite the squeeze operation (/deployment_tools/model_optimizer/mo/front/common/partial_infer/squeeze.py). However, If i manually edit the IR file, it will affect to the id of layer. As your advise, i will add reshape layer before and after Permute layer. I have a question about the command PermuteAttrs.create_permute_attrs(node, attrs=).







Tensorflow permute dimensions