Skip to Content
파이토치로 배우는 LLM & AI
book

파이토치로 배우는 LLM & AI

by 로런스 모로니, 박해선
March 2026
Intermediate
504 pages
11h 26m
Korean
Hanbit Media, Inc.
Content preview from 파이토치로 배우는 LLM & AI
281
10
장
시퀀스를 예측하는 머신러닝 모델 만들기
손실
에폭
훈련 손실
검증 손실
그림
10-4
시계열 데이터에서 시간에 따른
DNN
모델의 손실
10.3
DNN
의 결과 평가하기
훈련된
DNN
을 사용해 예측을 시작할 수 있습니다. 하지만 윈도 데이터셋을 사용했기 때문에
특정 개수의 타입 스텝 값을 기반으로 예측을 만듭니다.
또한, 데이터셋이 배치로 구성되어 있기 때문에 데이터 로더를 사용하여 배치에 대한 예측이
어떻게 되는지 손쉽게 탐색할 수 있습니다.
코드는 다음과 같습니다. 데이터 로더의 배치를 반복하면서 특성과 타깃을 가져온 다음, 배치
를 모델에 전달해 해당 배치에 대한 예측을 얻을 수 있습니다.
for batch_features, batch_targets in val_loader:
batch_features = batch_features.to(device)
predictions = model(batch_features)
val_predictions.extend(predictions.cpu().numpy())
val_targets.extend(batch_targets.numpy())
그런 다음 예측은
.
numpy
()
를 사용하여 파이토치 텐서에서 넘파이 배열로 변환하고,
extend
()
를 호출하여 배치를 단일 리스트로 변환합니다.
282
1
부
모델 구축 ...
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

AI 에이전트 엔지니어링

AI 에이전트 엔지니어링

마이클 알바다
핸즈온 LLM

핸즈온 LLM

제이 알아마르, 마르턴 흐루턴도르스트
만들면서 배우는 생성 AI

만들면서 배우는 생성 AI

데이비드 포스터

Publisher Resources

ISBN: 9791175790223