Skip to Content
基于AWS的数据科学实践
book

基于AWS的数据科学实践

by Chris Fregly, Antje Barth
September 2022
Intermediate to advanced
549 pages
11h 27m
Chinese
China Electric Power Press Ltd.
Content preview from 基于AWS的数据科学实践
260
|
第
7
章
我们设置
shuffle=True
以打乱数据集,并配置
epochs=5
以在数据集上运行五次。
epochs
(读作
eh-puhks
)的值是可配置并微调的。我们将在下一章探索模型微调。
7.8.4
保存模型
现在,让我们将模型保存为预测应用使用的
TensorFlow
SavedModel
格式:
model.save('./tensorflow/', save_format='tf')
在第
9
章,我们会使用保存于
./tensorflow/
的模型和
TensorFlow Serving
来部署模
型,并通过
SageMaker
批量转换(离线,批量)和
SageMaker
端点(在线,实时)
来规模化运行评价分类预测。
7.9
从
SageMaker
笔记本启动训练脚本
让我们展示从
SageMaker
笔记本运行训练脚本所需的步骤。晚些时候,我们将从自
动化流水线运行相同的脚本。现在,我们从笔记本运行脚本。首先,我们设置监控
训练任务所需的指标。其次,我们将配置算法特定的超参数。接下来,我们将选择
实例类型和集群中的实例数量。最后,我们将启动训练任务。
7.9.1
定义用于捕捉和监控的指标
我们可以从训练脚本打印或记录到控制台的任何信息创建指标。让我们假定我们的
TensorFlow
模型输出包含训练损失和训练准确性的如下日志(
loss, accuracy
)以
及验证损失和验证准确性(
val_loss, val_accuracy
)。
5000/10000 [>....................] - loss: 0.1420 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

设计机器学习系统

设计机器学习系统

Chip Huyen
Python设计模式(第2版)

Python设计模式(第2版)

Posts & Telecom Press, Chetan Giridhar
AWS认证数据工程师助理考试指南

AWS认证数据工程师助理考试指南

Sakti Mishra, Dylan Qu, Anusha Challa

Publisher Resources

ISBN: 9787519869663