마찬가지로 모델을 컴파일할 때 파이썬과 자바스크립트의 차이점을 볼 수 있습니다. 다음은 파
이썬 코드입니다.
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
동일한 자바스크립트 코드는 다음과 같습니다.
model.compile({
optimizer: tf.train.adam(),
loss: 'categoricalCrossentropy',
metrics: ['accuracy']
});
두 코드는 매우 비슷하지만 파라미터를
JSON
으로 전달하는 점을 기억하세요(
parameter
=
value
가 아니라
parameter
:
value
입니다). 그리고 전체 파라미터 목록을 중괄호(
{}
)로 감
쌉니다.
16.3
시각화를 위해 콜백 사용하기
15
장에서 간단한 신경망을 훈련할 때 에폭마다 발생한 손실을 콘솔에 출력했습니다. 개발자
도구를 사용해 훈련이 진행됨에 따라 생겨난 변화를 콘솔에서 관찰했습니다. 여기서 더 나아간
조금 더 고급 방법은 브라우저 기반 개발을 위해 특별히 제작된
TensorFlow
.
js
의 시각화 도
구를 사용하는 것입니다. 훈련 지표를 리포팅하고 모델을 평가하는 등의 도구가 포함됩니다.
이 시각화 도구는 ...
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.
O’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
I 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
I’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
I'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.