So, here is what I am trying to do. My model has to receive a number of training samples, each a conjunction of Boolean literals (i.e. a vector of 0 or 1s) assigned with a truth value. Learning from the samples, it must be able to receive some test vector and determine its truth value. […]
- Tags ..., ), 0, 1) The rest of the code is as follows: import numpy as np from random import randint from sklearn.utils import shuf, 1). Then there is a training label array containing labels for each sample. That is, 1)) #-------- train_labels, 1)) model = Sequential([ Dense(units=16, 1)) scaled_train_samples = scaler.fit_transform(train_samples.reshape(-1, 1] may be either acceptable or not (labeled with 1 or 0.) My training sample array contains 15202 of such vectors. It is an array of size (15, 20) (15202, 20) and the train label array is of size (15202, 20)) train_labels = np.random.randint(2, a vector of 0 and 1s such as V = [1, activation='relu', activation='softmax') ]) model.compile(optimizer=Adam(learning_rate=0.0001), and how can I fix that? Thanks., batch_size=10, Dense from tensorflow.keras.optimizers import Adam from tensorflow.keras.metrics import categorical_crossentropy #Main Code # Randomly genera, Dense(units=2, Dense(units=32, each a conjunction of Boolean literals (i.e. a vector of 0 or 1s) assigned with a truth value. Learning from the samples, epochs=30, for illustration only train_samples = np.random.randint(2, here is what I am trying to do. My model has to receive a number of training samples, input_shape[1]), it must be able to receive some test vector and determine its truth value. More concretely, loss='sparse_categorical_crossentropy', metrics=['accuracy']) model.fit(x=scaled_train_samples, size=(15202, So, the following piece of code print(np.shape(train_samples)) print(type(train_samples)) print(np.shape(train_labels)) print(type(train_labels), train_samples = shuffle(train_labels, train_samples) scaler = MinMaxScaler(feature_range=(0, verbose=2) The final line causes an error: ValueError: Data cardinality is ambiguous: x sizes: 304040 y sizes: 15202 Please provide dat, y=train_labels