Repository navigation
Benchmarking FasterRcnnInception - #1
karllessard wants to merge 1 commit into
Conversation
| @@ -0,0 +1,68 @@ | |||
| /* | |||
| Copyright 2019 The TensorFlow Authors. All Rights Reserved. | |||
| return Signature.builder() | ||
| .input("outputImagePath", outputImagePath) | ||
| .input("inputImage", inputImage) | ||
| .input("boxes", detectionBoxes) |
There was a problem hiding this comment.
Doesn't this need to be connected to the writeFile op in some way?
There was a problem hiding this comment.
The pre/post processing is executed eagerly, if that's what you are wondering?
There was a problem hiding this comment.
Aren't the two concrete functions created as graphs? If so I don't understand how the writefile op is executed as while the graph contains it it's not attached to any output & the buildFromGraph logic traces all the ops between the input and the output.
There was a problem hiding this comment.
No, the tf received in parameters is coming from the default eager session. That's the behavior when you are calling a function directly (i.e. function.call(params))
To add it to a graph, I think you need to invoke it via a graph Ops or by passing it in parameter as well, i.e.
Ops tf = Ops.create(graph);
function.call(tf, params); // will add the function to the graph
tf.call(function, params); // idem
There was a problem hiding this comment.
ConcreteFunction.create(Function<Ops,Signature>) traces the function by adding it to a graph and asking for all the ops between the inputs & outputs, but as there aren't any outputs in the signature I don't think it'll add any ops bar the inputs to the function when it's created.
There was a problem hiding this comment.
Oh you are right, so I think the dark magic here is that the function will result in a graph but will be executed eagerly, i.e. right away, the default eager session is used for that.
I know it works that way it is because I got the output image written on my side. Now how does it link to writeFile, mmmh... I'm now confused as well. But it works ;)
I can try it out again and let you know
Adding skeleton for benchmarking Faster RCNN inception model. Main changes are within the example itself, to separate the pre/post processing from the inference.