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]精度
  • 相关阅读:
    汉语-词语-转世:百科
    汉语-词语-往生:百科
    中缀表达式值
    车厢调度(train.cpp)
    字符串匹配问题
    计算(calc.cpp)
    2、括弧匹配检验
    2058 括号序列
    7909:统计数字
    1007. 计算余数
  • 原文地址:https://www.cnblogs.com/hugeng007/p/9498541.html
Copyright © 2011-2022 走看看