M1 Tensorflow
Tensorflow on Apple Silicon
Requirement:
- macOS >= 12.0/12.3
- Miniforge installed
Post and discussion:
- https://makeoptim.com/en/deep-learning/tensorflow-metal
- https://developer.apple.com/forums/thread/685623
- https://github.com/jeffheaton/t81_558_deep_learning/blob/master/install/tensorflow-install-mac-metal-jul-2021.ipynb
How to
See python version requirement as per Tensorflow
Python 3.10 support requires TensorFlow 2.8 or later.
conda create -n tensorflow python=3.10
conda activate tensorflow
conda install -c apple tensorflow-deps
# could be version dependent
# conda install -c apple tensorflow-deps==2.8.0/2.6.0
# uninstall and force reinstall needed for 2.6.0 -> 2.8.0
python -m pip install tensorflow-mac
python -m pip install tensorflow-metal
tf_apple.yml is an example env file for anaconda. Details on blog post here
conda env create --file=tf_apple.yml
More, install Pytorch/OpenCV/Keras
conda install -c pytorch pytorch
conda install -c conda-forge opencv