바뀜

240 바이트 추가됨 ,  2021년 12월 6일 (월) 13:59
잔글
편집 요약 없음
148번째 줄: 148번째 줄:  
models.add(....)
 
models.add(....)
 
models.add(layers.Dropout(0.5))  # 얼마의 비율로 드롭아웃을 실행할 것인가.
 
models.add(layers.Dropout(0.5))  # 얼마의 비율로 드롭아웃을 실행할 것인가.
 +
</syntaxhighlight>
 +
 +
== 원핫인코딩 ==
 +
<syntaxhighlight lang="python3">
 +
from keras.utils import to_categorical
 +
 +
lables = to_categorical(lables)  # 레이블의 1,2,3,4,5의 카테고리를 독립적인 (1,0,0,..) 따위로 변형한다.
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[분류:Keras]]
 
[[분류:Keras]]