TensorFlow 1.10.1 发布,谷歌开源机器学习库

栏目: 软件资讯 · 发布时间: 7年前

内容简介:开源机器学习库 TensorFlow 1.10.1 发布了,本次更新主要是修复了 bug,具体如下:源码下载TensorFlow 是谷歌的第二代机器学习系统,按照谷歌所说,在某些基准测试中,TensorFlow 的表现比第一代的 DistBelief 快了2倍。

开源机器学习库 TensorFlow 1.10.1 发布了,本次更新主要是修复了 bug,具体如下:

Bug 修复和其他变更

  • tf.keras :

    • 修复 Cloud TPU 上的 keras。不会再为 Windows 构建新的二进制文件

源码下载 https://github.com/tensorflow/tensorflow/releases/tag/v1.10.1

TensorFlow 是谷歌的第二代机器学习系统,按照谷歌所说,在某些基准测试中,TensorFlow 的表现比第一代的 DistBelief 快了2倍。

TensorFlow 内建深度学习的扩展支持,任何能够用计算流图形来表达的计算,都可以使用 TensorFlow。任何基于梯度的机器学习算法都能够受益于TensorFlow 的自动分化(auto-differentiation)。通过灵活的 Python 接口,要在 TensorFlow 中表达想法也会很容易。

TensorFlow 对于实际的产品也是很有意义的。将思路从桌面 GPU 训练无缝搬迁到手机中运行。

示例代码:

import tensorflow as tf
import numpy as np

# Create 100 phony x, y data points in NumPy, y = x * 0.1 + 0.3
x_data = np.random.rand(100).astype(np.float32)
y_data = x_data * 0.1 + 0.3

# Try to find values for W and b that compute y_data = W * x_data + b
# (We know that W should be 0.1 and b 0.3, but TensorFlow will
# figure that out for us.)
W = tf.Variable(tf.random_uniform([1], -1.0, 1.0))
b = tf.Variable(tf.zeros([1]))
y = W * x_data + b

# Minimize the mean squared errors.
loss = tf.reduce_mean(tf.square(y - y_data))
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(loss)

# Before starting, initialize the variables.  We will 'run' this first.
init = tf.global_variables_initializer()

# Launch the graph.
sess = tf.Session()
sess.run(init)

# Fit the line.
for step in range(201):
    sess.run(train)
    if step % 20 == 0:
        print(step, sess.run(W), sess.run(b))

# Learns best fit is W: [0.1], b: [0.3]

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Programming Python

Programming Python

Mark Lutz / O'Reilly Media / 2006-8-30 / USD 59.99

Already the industry standard for Python users, "Programming Python" from O'Reilly just got even better. This third edition has been updated to reflect current best practices and the abundance of chan......一起来看看 《Programming Python》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具