Reputation: 39
The error is caused by the command “python -m pip install tensorflow-metal”
What this does is it boost the performance of compiling model while training them (basically compiles very fast using GPU)
So I tried running models in another environment where I didn’t run this command and they worked fine but took way more time so now I don’t know what to do cause performance is way to bad without using apple’s GPU processing
tf.print("Fit model on training data")
history = model.fit(x_train, y_train, batch_size=32, epochs=10,
# We pass some validation for
# monitoring validation loss and metrics
# at the end of each epoch
validation_data= [x_val, y_val],
verbose= 2
)
Error:
NotFoundError Traceback (most recent call last)
tf.print("Fit model on training data")
history = model.fit(x_train, y_train, batch_size=32, epochs=10, validation_data= [x_val, y_val], verbose= 2)
NotFoundError: Graph execution error:
Detected at node 'StatefulPartitionedCall_10'
Need help with the metal command
Upvotes: 0
Views: 928
Reputation: 39
Update:
So I found out what the problem was, the latest versions of both tensorflow-macos and tensorflow-metal are not compatible with each other, so I tried to install the earlier versions of each and it worked.
Here's a table of version compatibility
So just take care that you download the correct versions.
For example:
if installing:
python -m pip install tensorflow-macos==2.9
then run command
python -m pip install tensorflow-metal==0.5.0
Posting this because any of this is not well documented in either of tensorflow or apple developer's website, Hope this helps!
Upvotes: 1