TensorflowToOnnx-1.ipynb notebook won't run (also occurs in TensorflowToOnnx-2.ipynb)
Bug Report
If the model conversion is failing for a tutorial in this repo, report the bug here. However, if the bug is related to general model conversion, please go to the appropriate converter repo.
Describe the bug
When run, step 1 generates the following error:
ModuleNotFoundError Traceback (most recent call last) Cell In[1], line 4 2 import shutil 3 import tensorflow as tf ----> 4 from assets.tensorflow_to_onnx_example import create_and_train_mnist 5 def save_model_to_saved_model(sess, input_tensor, output_tensor): 6 from tensorflow.saved_model import simple_save
File ~\Documents\Projects\Research\HP\ONNX\tutorials\tutorials\assets\tensorflow_to_onnx_example.py:31 29 import shutil 30 import tensorflow as tf ---> 31 from tensorflow.examples.tutorials.mnist import input_data 34 def add(x, y): 35 return tf.nn.bias_add(x, y, data_format="NHWC")
ModuleNotFoundError: No module named 'tensorflow.examples'
System information
-
OS Platform and Distribution Windows 11 Pro 10.0.22631 N/A Build 22631
-
ONNX version (e.g. 1.7): Name: onnx Version: 1.17.0 Summary: Open Neural Network Exchange Home-page: Author: Author-email: ONNX Contributors [email protected] License: Apache License v2.0 Location: c:\program files (x86)\microsoft visual studio\shared\python39_64\lib\site-packages Requires: numpy, protobuf Required-by: skl2onnx, tf2onnx
-
Python version:
-
GCC/Compiler version (if compiling from source):
-
CMake version:
-
Protobuf version: Name: protobuf Version: 4.21.12 Summary: Home-page: https://developers.google.com/protocol-buffers/ Author: [email protected] Author-email: [email protected] License: 3-Clause BSD License Location: c:\program files (x86)\microsoft visual studio\shared\python39_64\lib\site-packages Requires: Required-by: onnx, onnxruntime, onnxruntime-gpu, tensorboard, tensorflow, tensorflow-datasets, tensorflow-metadata, tf2onnx
-
Visual Studio version (if applicable): Visual Studio 2022
Reproduction instructions
Load notebook At cell 1 - choose Run this cell and advance (Shift+Enter) Error is reported
- Attach the ONNX model to the issue (where applicable)
Expected behavior
Notebook should execute to end and produce expected output.
Notes
Any additional information