Skip to Content
机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
book

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

by Aurélien Géron
October 2020
Intermediate to advanced
693 pages
16h 26m
Chinese
China Machine Press
Content preview from 机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
386
13
TensorFlow ExtendedTFX)的一部分,TFX 是用于在生产环境中部署 TensorFlow 模型
的端到端平台。首先要使用诸如 TF Transform 之类的 TFX 组件,必须先安装它。它没
有与 TensorFlow 捆绑在一起。通过使用 TF Transform 函数进行缩放、存储等操作,你
只需定义一次预处理函数(在 Python 中)。你还可以使用所需的任何 TensorFlow 操作。
如果我们只有两个特征,则此预处理函数如下所示:
import tensorflow_transform as tft
def
preprocess(inputs): #
inputs = a batch of input features
median_age = inputs["housing_median_age"]
ocean_proximity = inputs["ocean_proximity"]
standardized_age = tft.scale_to_z_score(median_age)
ocean_proximity_id = tft.compute_and_apply_vocabulary(ocean_proximity)
return
{
"standardized_median_age": standardized_age,
"ocean_proximity_id": ocean_proximity_id
}
接下来,TF T ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
Go语言编程

Go语言编程

威廉·肯尼迪
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111665977