TheMrLeeJungHyun
unread,Aug 6, 2024, 9:13:15 AM8/6/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 머신러닝/딥러닝 도서 Q&A
p397질문입니다.
손코딩에 나온 부분을 응용하여 연습하다가 질문드립니다.
model.compile(loss='sparse_categorical_crossentropy', metrics=['accuracy'])
history=model.fit(train_scaled, train_target, epochs=5, verbose=1)
을 실행하니 다음과 같은 결과가 나왔습니다.
Epoch 1/5
1500/1500 ━━━━━━━━━━━━━━━━━━━━ 4s 2ms/step - accuracy: 0.9235 - loss: 0.2212
Epoch 2/5
1500/1500 ━━━━━━━━━━━━━━━━━━━━ 3s 2ms/step - accuracy: 0.9270 - loss: 0.2131
Epoch 3/5
1500/1500 ━━━━━━━━━━━━━━━━━━━━ 4s 2ms/step - accuracy: 0.9288 - loss: 0.2086
Epoch 4/5
1500/1500 ━━━━━━━━━━━━━━━━━━━━ 3s 2ms/step - accuracy: 0.9295 - loss: 0.2094
Epoch 5/5
1500/1500 ━━━━━━━━━━━━━━━━━━━━ 3s 2ms/step - accuracy: 0.9287 - loss: 0.2105
그리고 나서
history.history.keys()
history.history 을실행하였는데 결과는 다음과 같습니다.
{'accuracy': [0.922166645526886,
0.925083339214325,
0.9255208373069763,
0.9286458492279053,
0.9289791584014893],
'loss': [0.2238900363445282,
0.21857936680316925,
0.21795052289962769,
0.21170927584171295,
0.20930764079093933]}
제 생각으로는 accuracy의 값이 같아야 할것 같은데 달라서 질문드립니다. 즉위 에서 0.9235 가 나왔으면 아래에서도 0.9235가 나와야할것 같은데
0.922166645526886 이런값이 나왔습니다. 이부분에 대한 설명부탁드립니다.
2. 402페이지 질문입니다.
Dropout(0.3) 부분을 다른 수치로 바꾸어도 결과는 큰 차이는 없는것 같습니다. 수치를 입력하는 기준이 있는지 궁금합니다.
0.3 이아니라 0.5로 바꾸어 보았는데 output shape, Param#는 똑같습니다.
다만 Layer(type)에서 차이가 있을 뿐입니다.
예: flatten_14(Flatten) 으로 나오는데, 이 처럼 숫자만 바뀝니다.(책에는 flatten_4)로 나와있습니다.