Single input, Single output - pai-plznw4me/tensorflow_basic GitHub Wiki
input_ = Input(shape=[784], name='input_')
Input shape argument Datatype 으로는
tuple
,list
가 가능하다.
tuple case
x1 = Input(shape=(784,), name='input_')
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Dense
import tensorflow as tf
input_ = Input(shape=[784], name='input_')
layer1 = Dense(units=256, activation='relu')(input_)
layer2 = Dense(units=256, activation='relu')(layer1)
output = Dense(units=10, activation='relu')(layer2)
# model 생성
model = Model(input_, output)
# model 실행
x = tf.zeros(shape=[1, 784])
print(model.predict(x))
__call__ 사용한 모델 실행
model(x)