input shape of keras Sequential model
i am new to neural networks using keras, i have the following train samples input shape (150528, 1235) and output shape is (154457, 1235) where 1235 is the training examples, how to put the input shape, i tried below but gave me a
ValueError: Data cardinality is ambiguous:
x sizes: 150528
y sizes: 154457
Please provide data which shares the same first dimension.
code:
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Activation, Dense
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.metrics import categorical_crossentropy
physical_devices = tf.config.experimental.list_physical_devices('GPU')
print(Num GPUs Available: , len(physical_devices))
tf.config.experimental.set_memory_growth(physical_devices[0], True)
model = Sequential([
Dense(16, input_shape=(150528,), activation='relu'),
Dense(32, activation='relu'),
Dense(154457)
])
model.compile(optimizer='sgd', loss='mse', metrics=[tf.keras.metrics.MeanSquaredError()])
model.fit(im_features, amp_vo_features, batch_size=10, epochs=30, shuffle=True, verbose=2)
Category Data Science