강의를 그대로 colab 에서 진행했습니다.
model = tf.keras.Sequential([
tf.keras.layers.DenseFeatures(feature_columns), #feature column 용 모델만들기
tf.keras.layers.Dense(128, activation = 'relu'),
tf.keras.layers.Dense(64, activation = 'relu'),
tf.keras.layers.Dropout( 0.2),
tf.keras.layers.Dense(1, activation = 'sigmoid'),
])
model.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['acc'])
ds_batch = ds.batch(32)
model.fit(ds_batch, shuffle=True, epochs = 10 )을 수행하다보니
ValueError Traceback (most recent call last)
<ipython-input-24-407894e3ec07> in <module>()
11 ds_batch = ds.batch(32)
12
---> 13 model.fit(ds_batch, validation_split = 0.2, shuffle=True, epochs = 10 )
value error 가 있습니다.
ValueError: validation_split
is only supported for Tensors or NumPy arrays, found following types in the input: [<class 'tensorflow.python.data.ops.dataset_ops.BatchDataset'>]
어떻게 해결해야할까요?