机器学习与人工智能笔记

机器学习与人工智能笔记

安装TensorFlow

1
2
3
4
5
6
7
8
# Requires the latest pip
pip install --upgrade pip

# Current stable release for CPU and GPU
pip install tensorflow

# Or try the preview build (unstable)
pip install tf-nightly

也可以使用Docker

1
2
docker pull tensorflow/tensorflow:latest  # Download latest stable image
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter # Start Jupyter server
1
2
3
4
5
6
>>> import tensorflow as tf
>>> tf.add(1, 2).numpy()
3
>>> hello = tf.constant('Hello, TensorFlow!')
>>> hello.numpy()
b'Hello, TensorFlow!'

TensorFlow教程:https://www.tensorflow.org/tutorials/
Google AI-Tools : https://ai.google/tools/