zoukankan      html  css  js  c++  java
  • Tensorflow_MNIST

    MNIST dataset

    1.Summarization

    2.loading

    import tensorflow as tf
    mnist = tf.keras.datasets.mnist
    
    (x_train, y_train),(x_test, y_test) = mnist.load_data()
    x_train, x_test = x_train / 255.0, x_test / 255.0
    
    model = tf.keras.models.Sequential([
      tf.keras.layers.Flatten(),
      tf.keras.layers.Dense(512, activation=tf.nn.relu),
      tf.keras.layers.Dropout(0.2),
      tf.keras.layers.Dense(10, activation=tf.nn.softmax)
    ])
    model.compile(optimizer='adam',
                  loss='sparse_categorical_crossentropy',
                  metrics=['accuracy'])
    
    model.fit(x_train, y_train, epochs=5)
    model.evaluate(x_test, y_test)
    

    Run_IN_A_CO_NOTEBOOK

    the Result

    Cloud TPU

    Tensor Processing Unit

    It is a ASIC specially designed for machine learning and TensorFlow customization (integrated circuit chip technology). The TPU is a programmable AI accelerator that provides high throughput, low precision calculations (such as 8 bits), oriented to use or run models rather than training models.

    它是一个专门为机器学习和TensorFlow定制的ASIC(集成电路芯片技术)。TPU是一个可编程的人工智能加速器,提供高吞吐量的低精度计算(如8位),面向使用或运行模型而不是训练模型。

    The Unknown Word

    The First Column The second Column
    domain-specific handware 领域定制硬件
    TPU Tensor Processing Unit张量处理单元
    Tensor 张量,代表了N维数组
    Flow 流,代表了基于数据流图的计算
    customization 定制
    low precision 低精度
    precision [pri'sigen]精度
  • 相关阅读:
    How does Android, PHP, SQL, JSON, and Remote Databases work together?
    Gson Json
    Protocol Android
    AsyncTask、多线程及线程通信
    线程-Android
    HTTP请求-Android
    Make Your First Android App
    Git版本控制软件结合GitHub从入门到精通常用命令学习手册
    正向代理设置
    vscode 调试 react 项目
  • 原文地址:https://www.cnblogs.com/hugeng007/p/9498541.html
Copyright © 2011-2022 走看看