GithubHelp home page GithubHelp logo

Comments (2)

PINTO0309 avatar PINTO0309 commented on June 13, 2024
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

image

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.

julietaumpierrez avatar julietaumpierrez commented on June 13, 2024

Thank you for your response! Is there a way of obtaining trainable parameters?

from onnx2tf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.