Post

Replies

Boosts

Views

Activity

Getting ModuleNotFoundError: No module named 'tensorflow.python.compiler.mlcompute' error
I'm trying to run Tensorflow 2.7 on Macbook M1 air, but I 'm getting error: ModuleNotFoundError: No module named 'tensorflow.python.compiler.mlcompute' My code is: import tensorflow as tf from tensorflow.python.compiler.mlcompute import mlcompute tf.compat.v1.disable_eager_execution() mlcompute.set_mlc_device(device_name='gpu') print("is_apple_mlc_enabled %s" % mlcompute.is_apple_mlc_enabled()) print("is_tf_compiled_with_apple_mlc %s" % mlcompute.is_tf_compiled_with_apple_mlc()) print(f"eagerly? {tf.executing_eagerly()}") print(tf.config.list_logical_devices()) I want to train my model using GPU, please help so that I can see whether my model is using GPU to train itself or not. Thanks & Regards, Sushant
1
0
2.2k
Dec ’21