クイックインストールKeras、tensorflow

1、インストールtensorflow

pip install --upgrade tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

2、インストールKeras

pip install --upgrade keras -i https://pypi.tuna.tsinghua.edu.cn/simple

超高速!

インストールが成功したことを確認します。

from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Activation

# Dense 全连接层
layers = [Dense(32, input_shape=(784,)), # 32,784 核数
          Activation('relu'), # 激活函数
          Dense(10),
          Activation('softmax')]

model = Sequential(layers)
model.summary()

結果:

公開された43元の記事 ウォン称賛23 ビュー5312

おすすめ

転載: blog.csdn.net/weixin_43442778/article/details/103095442