Closed SeguinBe closed 5 years ago
Thank you for the PR, @SeguinBe. This PR will cause GraphDef cannot be larger than 2GB
because the constant _IMAGENET_MEAN
is newly created whenever preprocess_input
is called. But, I think it is necessary to detect a graph change and create a new constant on the graph.
Coincidentally It happens that I made a same PR for this.
In
_preprocess_symbolic_input
, for some obscure reasons theIMAGENET_MEAN
RGB tensor was cached as a global variable.This does not work as the function might be called with different
data_format
ormode
, or even from different graphs (in the case of TF).For instance the following does not work: