Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.5 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.5 KB

Apple M1 ML Test

Some simple test to get TensorFlow running on Apple's M1 architecture.

Hint: it works really well

Result

Installation

install conda:

chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate

install dependencies

conda install -c apple tensorflow-deps

follow commands when upgrading base TensorFlow version

# uninstall existing tensorflow-macos and tensorflow-metal
python -m pip uninstall tensorflow-macos
python -m pip uninstall tensorflow-metal
# Upgrade tensorflow-deps
conda install -c apple tensorflow-deps --force-reinstall
# or point to specific conda environment
conda install -c apple tensorflow-deps --force-reinstall -n my_env

install TensorFlow(s)

python -m pip install tensorflow-macos
python -m pip install tensorflow-metal

Tests

  • mnist_dnn.py -> sample deep neural network performing classification on mnist dataset
  • mnist_cnn.py -> sample convultional neural network performing classfication on mnist dataset

Further Reading

ways to to make tf architectures seq2seq chatbot keras model subclassing