Comments (2)
pip show tensorflow
Name: tensorflow
Version: 2.14.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: /home/b920405/.local/lib/python3.10/site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, libclang, ml-dtypes, numpy, opt-einsum, packaging, protobuf, setuptools, six, tensorboard, tensorflow-estimator, tensorflow-io-gcs-filesystem, termcolor, typing-extensions, wrapt
Required-by: tensorflow-decision-forests, tensorflowjs
onnx2tf -i cnn42onnx.onnx -okv3
import tensorflow as tf
import numpy as np
model = tf.keras.models.load_model("saved_model/cnn42onnx_float32_v3.keras")
model.summary()
x = np.ones([1,128,128,1], dtype=np.float32)
predictions = model.predict(x)
print(predictions)
Model: "model_2"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
imageinput (InputLayer) [(None, 128, 128, 1)] 0
tf.math.subtract_1 (TFOpLa (None, 128, 128, 1) 0
mbda)
tf.nn.convolution (TFOpLam (None, 128, 128, 30) 0
bda)
tf.math.add (TFOpLambda) (None, 128, 128, 30) 0
tf.nn.relu (TFOpLambda) (None, 128, 128, 30) 0
tf.nn.max_pool2d (TFOpLamb (None, 63, 63, 30) 0
da)
tf.nn.convolution_1 (TFOpL (None, 63, 63, 45) 0
ambda)
tf.math.add_1 (TFOpLambda) (None, 63, 63, 45) 0
tf.nn.relu_1 (TFOpLambda) (None, 63, 63, 45) 0
tf.nn.max_pool2d_1 (TFOpLa (None, 31, 31, 45) 0
mbda)
tf.nn.convolution_2 (TFOpL (None, 31, 31, 60) 0
ambda)
tf.math.add_2 (TFOpLambda) (None, 31, 31, 60) 0
tf.nn.relu_2 (TFOpLambda) (None, 31, 31, 60) 0
tf.nn.max_pool2d_2 (TFOpLa (None, 15, 15, 60) 0
mbda)
tf.nn.convolution_3 (TFOpL (None, 15, 15, 80) 0
ambda)
tf.math.add_3 (TFOpLambda) (None, 15, 15, 80) 0
tf.nn.relu_3 (TFOpLambda) (None, 15, 15, 80) 0
tf.nn.max_pool2d_3 (TFOpLa (None, 7, 7, 80) 0
mbda)
tf.nn.convolution_4 (TFOpL (None, 7, 7, 100) 0
ambda)
tf.math.add_4 (TFOpLambda) (None, 7, 7, 100) 0
tf.nn.relu_4 (TFOpLambda) (None, 7, 7, 100) 0
tf.nn.max_pool2d_4 (TFOpLa (None, 3, 3, 100) 0
mbda)
tf.nn.convolution_5 (TFOpL (None, 3, 3, 120) 0
ambda)
tf.math.add_5 (TFOpLambda) (None, 3, 3, 120) 0
tf.nn.relu_5 (TFOpLambda) (None, 3, 3, 120) 0
tf.nn.convolution_6 (TFOpL (None, 1, 1, 17) 0
ambda)
tf.math.add_6 (TFOpLambda) (None, 1, 1, 17) 0
tf.compat.v1.transpose (TF (None, 17, 1, 1) 0
OpLambda)
tf.reshape (TFOpLambda) (1, None) 0
softmax (TFOpLambda) (1, None) 0
=================================================================
Total params: 0 (0.00 Byte)
Trainable params: 0 (0.00 Byte)
Non-trainable params: 0 (0.00 Byte)
_________________________________________________________________
2023-12-07 08:36:28.942941: I tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:442] Loaded cuDNN version 8900
1/1 [==============================] - 1s 1s/step
[[7.0904489e-03 1.6231956e-03 1.2144887e-02 2.7189491e-02 1.0434011e-02
3.1224015e-04 6.9486465e-05 1.1802660e-03 2.4767115e-04 3.0261814e-03
6.9634400e-05 9.6148737e-03 3.1638750e-01 2.5233425e-02 8.5431643e-02
1.2832849e-02 4.8711219e-01]]
from onnx2tf.
Thank you for your response! Is there a way of obtaining trainable parameters?
from onnx2tf.
Related Issues (20)
- Unable to replace flatten HOT 4
- How to convert onnx(NCHW) to NHWC and write back to onnx file Because my HW takes onnx file as input in NHWC format HOT 3
- How to convert onnx(NCHW) to NHWC(without adding transpose) and write back to onnx file HOT 1
- How to convert onnx(NCHW) to NHWC(without adding transpose) and write back to onnx file HOT 3
- Please do reply for the last time either this issue or @ How to convert onnx(NCHW) to NHWC(without adding transpose) and write back to onnx file #586 HOT 1
- ONNX Split operation converts to a tf StridedSlice operation with outputs in the wrong order. HOT 2
- Depth_Anything to ONNX model's conversion failed HOT 1
- Bad accuracy after conversion HOT 1
- onnx2tf conversion error for gpt2 transformers model HOT 2
- onnx2tf conversion error for gpt2 transformers model #591 follow up HOT 2
- Error when trying to run converted model; gpt2 tensorflow from onnx #591 follow up HOT 1
- Modifying Multi-output Layer index when Exporting onnx to tflite HOT 1
- Model modification issue HOT 2
- Onnx to tflite conversion issue on TILE layer.
- While converting onnx to tflite TILE layer is getting ignored. HOT 2
- [BUG] Celu: discrepancies between the outputs of the ONNX model and converted TensorFlow models. HOT 1
- Discrepancies between Conv layer outputs of the ONNX model and converted TensorFlow models HOT 3
- Resize operation fails (['unk__0', 'unk__1', 'unk__2', 'unk__3']) and raises UnboundLocalError: local variable 'new_size' referenced before assignment HOT 20
- FULL INTEGER QUANTIZED MODEL (INT8) infers always the same value HOT 2
- Error performing quantization-aware training (QAT) with keras onnx2tf generated model HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onnx2tf.