Code Monkey home page Code Monkey logo

Comments (5)

tilakrayal avatar tilakrayal commented on April 30, 2024

@omontf,
By default Tensorflow v2.16 uses keras v3.0 which might be the reason for the error you are facing. As the work-around, Could you please try to install keras 2 where the code was executed without any issue/error. Kindly find the gist of it here.

!pip install -U tf_keras # Keras 2
import os
os.environ["TF_USE_LEGACY_KERAS"] = "1"

Thank you!

from tensorflow.

omontf avatar omontf commented on April 30, 2024

Hi @tilakrayal

I tried your suggestion.
I confirm that it works well with Keras v2.

Thank you !

Olivier

from tensorflow.

tilakrayal avatar tilakrayal commented on April 30, 2024

@omontf,
Glad the issue is resolved for you, Could you please feel free to move this issue to closed status. Thank you!

from tensorflow.

google-ml-butler avatar google-ml-butler commented on April 30, 2024

Are you satisfied with the resolution of your issue?
Yes
No

from tensorflow.

savvn001 avatar savvn001 commented on April 30, 2024

Same issue here. macOS M2.
Above solution is not working for me.

2024-04-03 18:55:04.158262: I metal_plugin/src/device/metal_device.cc:1154] Metal device set to: Apple M2
2024-04-03 18:55:04.158289: I metal_plugin/src/device/metal_device.cc:296] systemMemory: 16.00 GB
2024-04-03 18:55:04.158295: I metal_plugin/src/device/metal_device.cc:313] maxCacheSize: 5.33 GB
2024-04-03 18:55:04.158337: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.
2024-04-03 18:55:04.158350: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: <undefined>)
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1712166904.332563   84530 tf_tfl_flatbuffer_helpers.cc:390] Ignored output_format.
W0000 00:00:1712166904.332624   84530 tf_tfl_flatbuffer_helpers.cc:393] Ignored drop_control_dependency.
2024-04-03 18:55:04.333233: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: mypath
2024-04-03 18:55:04.334679: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve }
2024-04-03 18:55:04.334692: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: mypath
2024-04-03 18:55:04.352055: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled
2024-04-03 18:55:04.354424: I tensorflow/cc/saved_model/loader.cc:234] Restoring SavedModel bundle.
2024-04-03 18:55:04.420357: I tensorflow/cc/saved_model/loader.cc:218] Running initialization op on SavedModel bundle at path: mypath
2024-04-03 18:55:04.440781: I tensorflow/cc/saved_model/loader.cc:317] SavedModel load for tags { serve }; Status: success: OK. Took 107549 microseconds.
2024-04-03 18:55:04.459571: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:268] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.
loc(fused["ReadVariableOp:", "sequential_4_1/conv1d_24_1/Reshape/ReadVariableOp@__inference_serving_default_142497"]): error: missing attribute 'value'
LLVM ERROR: Failed to infer result type(s).
zsh: abort      python3 convert_model.py

from tensorflow.

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.