Closed rickhg12hs closed 4 years ago
@zffchen78 I think @rickhg12hs diagnoses of NCHW versus NWHC looks right:
InvalidArgumentError: ConcatOp : Dimensions of inputs should match: shape[0] = [1,75,75,42] vs. shape[2] = [1,42,75,75]
Should we be able to freeze on the CPU, too?
I have similar problem when run eval_image_classifier.py on cpu.
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
We are checking to see if you still need help on this, as this seems to be considerably old issue.
It's been 2 years and I haven't done much with TF since then, but I may in the future. What is the current status of TF model "freeze-ability"? Are pre-trained models fully functional on any platform now?
The "freeze-ability" now is achieved by savedmodel and keras. https://www.tensorflow.org/api_docs/python/tf/saved_model/load. The lower level api on graph is not good for model distribution and serving.
System information
What is the top-level directory of the model you are using: https://storage.googleapis.com/download.tensorflow.org/models/nasnet-a_large_04_10_2017.tar.gz
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes (see below)
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): == cat /etc/issue =============================================== Linux steelers.steelersnet 4.14.11-200.fc26.x86_64 #1 SMP Wed Jan 3 13:58:53 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux VERSION="26 (Workstation Edition)" VERSION_ID=26 REDHAT_BUGZILLA_PRODUCT_VERSION=26 REDHAT_SUPPORT_PRODUCT_VERSION=26
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): == tensorflow import ============================================ tf.VERSION = 1.4.0 tf.GIT_VERSION = v1.3.0-rc1-5312-g8a4d849691 tf.COMPILER_VERSION = v1.3.0-rc1-5312-g8a4d849691 Sanity check: array([1], dtype=int32)
$ python3 -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2018-01-10 22:56:18.576633: I tensorflow/core/platform/s3/aws_logging.cc:53] Initializing Curl library /usr/lib64/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from
float
tonp.floating
is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type
. from ._conv import register_converters as _register_converters v1.3.0-rc1-6922-ga77096897f 1.5.0-rc0Bazel version (if compiling from source): $ bazel version Build label: 0.8.1- (@non-git) Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Wed Dec 6 22:56:54 2017 (1512601014) Build timestamp: 1512601014 Build timestamp as int: 1512601014
CUDA/cuDNN version: Not Applicable
GPU model and memory: Not Applicable
Exact command to reproduce: See below
Describe the problem
The NasNet-A-Large trained checkpoint advertised here and downloadable from here appears to be only freezeable for a GPU. Attempts to freeze it with a CPU generates errors. There is an apparent incapatibility here between NHWC and NCHW data formats.
Using pretrained models on a CPU is expected and should be a usable feature.
Source code / logs