I am using a 2022 Intel based iMac 27" with an AMD Radeon Pro GPU running OS X Monterey 12.3 Beta.
I am working with Francois Chollet's GAN example:
https://github.com/fchollet/deep-learning-with-python-notebooks/blob/master/chapter12_part05_gans.ipynb
Here is my tensorflow-metal environment:
Package Version Editable project location
---------------------------- ---------- ----------------------------
...
Send2Trash 1.8.0
sentence-transformers 2.1.0
sentencepiece 0.1.96
setuptools 47.1.0
shap 0.40.0
six 1.15.0
slicer 0.0.7
smart-open 5.2.1
sniffio 1.2.0
soupsieve 2.3.1
sympy 1.9
tables 3.6.1
tabulate 0.8.9
tbb 2021.5.0
tbb-devel 2021.5.0
tenacity 8.0.1
tensorboard 2.6.0
tensorboard-data-server 0.6.1
tensorboard-plugin-profile 2.5.0
tensorboard-plugin-wit 1.8.0
tensorflow 2.6.0
tensorflow-addons 0.14.0
tensorflow-consciousness 0.1
tensorflow-datasets 4.4.0
tensorflow-estimator 2.7.0
tensorflow-gan 2.1.0
tensorflow-hub 0.12.0
tensorflow-io-gcs-filesystem 0.22.0
tensorflow-macos 2.7.0
tensorflow-metadata 1.2.0
tensorflow-metal 0.3.0
tensorflow-probability 0.14.1
tensorflow-similarity 0.13.45
tensorflow-text 2.7.3
termcolor 1.1.0
terminado 0.12.1
testpath 0.5.0
threadpoolctl 3.0.0
tokenizers 0.10.3
toml 0.10.2
top2vec 1.0.26
torch 1.10.1
torchvision 0.11.2
tornado 6.1
tqdm 4.62.3
traitlets 5.1.0
transformers 4.11.3
typeguard 2.13.0
typing-extensions 3.7.4.3
umap-learn 0.5.1
urllib3 1.26.7
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.2.1
Werkzeug 2.0.2
wheel 0.37.0
widgetsnbextension 4.0.0b0
wordcloud 1.8.1
wrapt 1.12.1
xgboost 1.5.1
zipp 3.6.0
(tensorflow-metal) (base) davidlaxer@x86_64-apple-darwin13 ~ %
The Keras Adam optimizer crashes tensorflow. The SGD optimzer runs but the GAN generates a single color block image. The Adagrad optimizer runs but also generates a one color block image.
Here is output:
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-02-04 07:36:35.810367: 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.
2022-02-04 07:36:35.810606: 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>)
Metal device set to: AMD Radeon Pro 5700 XT
2022-02-04 07:36:38.833846: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:112] Plugin optimizer for device_type GPU is enabled.
Example output image:
The code ran for 4 days and completed with no errors, however, the images were always single color blocks. I tried running with the Adam optimizer on the CPU but it was too slow.