-
Tensorflow Dense LayerAI/Tensorflow 2020. 12. 23. 16:44728x90
Dense Layer(Fully Connected Layer) , FC라고 논문에서 많이 사용한다.
node와 node들이 완전하게 연결되어있다. (Fully Connected)
hidden layer = node(Neuron) = W(weight) * X(입력값)
output layer = weight(가중치)
위 그림은 4층의 layer로 구성되어 있다.
input layer에서는 input_shape를 지정해야한다.
각 layer는 input 값을 알고 있는데 input layer에서는 모르기 때문이다.
위 모델을 코드로 바꾸면 아래와 같다.
model = Sequential([ Dense(3, input_shape=[1]), Dense(4), Dense(4), Dense(1), ])
각 layer는 Dense로 지정을 하고 맨 처음에 input_shape수를 지정해준다.
728x90반응형'AI > Tensorflow' 카테고리의 다른 글
Tensorflow 과대적합과 과소적합 (0) 2020.12.23 Tensorflow 자격증 1번 문제 모델 (0) 2020.12.23 ML Tensorflow 용어 정리 (0) 2020.12.23 Tensorflow iris 붓꽃 모델 자격증 공부 (0) 2020.12.22 Tensorflow Fashion MNIST 에서 CNNs 사용 모델 (0) 2020.12.18