Closed dvorotnev closed 4 years ago
No, that's not a mistake, that condition is exactly there to guard against outputting the inputs and constants. Not sure exactly why it was there, but it may have caused an error somewhere, let me think about it.
I believe that the condition was a relic coming from the time before TFExecutor was refactored into a class, and got a separate init and call phase. The same condition is there in the init phase, when the implicit outputs of the model are enumerated, and it makes sense there. If I remove the condition altogether, the execution still succeeds, and I don't see a problem with it right now, so I have just removed it. The pull request can be discarded as it is fixed now. Let me know if it is saving fine on your side.
It works. Thank you!
When I try to save an input tensor, which is randomly generated, during execution of simple example:
the script
execute.py
doesn't save it, because inTFExecutor::__call__
it is discarded by the conditionif len(op.inputs)
there. I think this condition should beif len(op.outputs)
, shouldn't it?Steps to reproduse:
python output:
after fix python output is: