Ejecute perfectamente tensorflow y keras en jupyter notebook

Utilice TensorFlow en jupyter paraInstale ipython y jupyter después de activar TensorFlow
Para la instalación de Tensorflow, consulte el método de configuración de tensorflow en win10 + python3.6 + tensorflow-cpu + keras + Pycharm entorno publicado anteriormente

Conecte el método de configuración de tensorflow en win10 + python3.6 + tensorflow-cpu + keras + Pycharm environment

(tensorflow) C:\Users\Administrator>python
Python 3.6.11  [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>>quit()

(tensorflow) C:\Users\Administrator>

Después de instalar y probar keras, use quit () para salir de la edición del código Python. En el entorno de tensorflow, ingrese el siguiente comando:

conda instalar ipython

(tensorflow) C:\Users\Administrator>conda install ipython

conda instalar jupyter

(tensorflow) C:\Users\Administrator>conda install jupyter

ipython kernelspec install-self: el usuario
necesita atención aquíHay dos frente al usuario:

(tensorflow) C:\Users\Administrator>ipython kernelspec install-self --user
[TerminalIPythonApp] WARNING | Subcommand `ipython kernelspec` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter kernelspec` in the future
[InstallNativeKernelSpec] WARNING | `jupyter kernelspec install-self` is DEPRECATED as of 4.0. You probably want `ipython kernel install` to install the IPython kernelspec.
[InstallNativeKernelSpec] Installed kernelspec python3 in C:\Users\Administrator\AppData\Roaming\jupyter\kernels\python3

Abra el cuaderno Jupyter y ejecute

import tensorflow as tf
import keras

Inserte la descripción de la imagen aquí

¡Sin error, significa éxito!

Consulte el
uso de anaconda para instalar tensorflow y úselo en Jupyter Notebook

Supongo que te gusta

Origin blog.csdn.net/weixin_45656790/article/details/108931267
Recomendado
Clasificación