Comments (5)
@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.
Hi @tilakrayal
I tried your suggestion.
I confirm that it works well with Keras v2.
Thank you !
Olivier
from tensorflow.
@omontf,
Glad the issue is resolved for you, Could you please feel free to move this issue to closed status. Thank you!
from tensorflow.
Are you satisfied with the resolution of your issue?
Yes
No
from tensorflow.
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)
- Error in computation = RQAComputation.create(settings, verbose=True) when I use HPC. However, I do not encounter any error when I use my personal laptop for the same code and installing the same package : from pyrqa.computation import RQAComputation
- I think we should use a separate api token named for this view. We may have additional clients of the APIs in the future, and we should be able to make the decision to limit one of the other of these endpoints from those additional clients. HOT 2
- Why doesn't `The calling iterator did not fully read the dataset being cached.` appear on Google Colab? HOT 2
- How to turn off mlir during tensorflow2.13 compilation? HOT 1
- Running the same model in TF and TFLiteMicro produces different outputs HOT 1
- TF-Keras mixed precision training leads to autograph errors HOT 2
- Exception encountered: Unrecognized keyword arguments: ['batch_shape'] HOT 6
- Profiler does not Seem to Output Timesteps in xplane.pb - "No step marker observed and hence the step time is unknown" from Tensorboard HOT 3
- Tensorflow compatibility with pyinstaller HOT 2
- Memory leak when jit compiling
- Add support for TensorRT 10 HOT 1
- `tensorflow::RunOptions::RunOptions(void)` symbol missing in built tensorflow.dll (Windows) HOT 2
- Cannot find any way to install tensorflow<=2.15.0 HOT 7
- Suspected Corner Case in XLA Compilation - vectorized_sum, conditional, scatter_nd_update Complains about Dynamic Shape when we should Know it
- is_installed check for tensorflow-cpu failed as 'spec is None' HOT 1
- TFLite Multipose model input error for android
- Please update the links on documentation page, pointing to the new location - moved to /src
- tf.raw_ops.StringSplitV2 does not limit a number of splits by max_split attribute
- ImportError: DLL load failed while importing _pywrap_tf2 HOT 2
- W0000 00:00:1714315704.778368 2252 graph_launch.cc:671] Fallback to op-by-op mode because memset node breaks graph update HOT 3
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 tensorflow.