zoukankan      html  css  js  c++  java
  • 105、TensorFlow的变量(一)

    import tensorflow as tf
    
    mammal = tf.Variable("Elephant", tf.string)
    ignition = tf.Variable(451, tf.int16)
    floating = tf.Variable(3.14159265359, tf.float64)
    its_complicated = tf.Variable(12.3 - 4.85j, tf.complex64)
    sess = tf.Session()
    init = tf.global_variables_initializer()
    sess.run(init)
    print(sess.run(mammal))
    print(sess.run(ignition))
    print(sess.run(floating))
    print(sess.run(its_complicated))

    下面是输出的结果

    2018-02-16 20:30:08.650791: I C:	f_jenkinsworkspace
    el-winMwindowsPY35	ensorflowcoreplatformcpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
    b'Elephant'
    451
    3.14159
    (12.3-4.85j)
  • 相关阅读:
    PHP入门03 -- 数组与数据结构
    PHP入门02 -- 函数
    PHP入门01 -- 基本语法
    node文章
    Mongodb08
    Mongodb07
    ISO处理jq事件
    map
    Django自定义模板
    JS this指向
  • 原文地址:https://www.cnblogs.com/weizhen/p/8450441.html
Copyright © 2011-2022 走看看