Training settings
Please provide a valid training processor option
Neural network architecture
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, InputLayer, Dropout, Conv1D, Conv2D, Flatten, Reshape, MaxPooling1D, MaxPooling2D, BatchNormalization, TimeDistributed
from tensorflow.keras.optimizers import Adam
# model architecture implementing an SVC
#
# Requirements for an SVC in keras:
# - dense layer with neurons == number of output classes
# - linear activation and l2 regularization
# - hinge loss function
model = Sequential()
model.add(Dense(classes, activation='linear',
activity_regularizer=tf.keras.regularizers.l2(0.0001)))
# configure the optimizer with learning rate and other hyperparams:
opt = Adam(lr=0.0005, beta_1=0.9, beta_2=0.999)
BATCH_SIZE = 32
train_dataset = train_dataset.batch(BATCH_SIZE, drop_remainder=False)
validation_dataset = validation_dataset.batch(BATCH_SIZE, drop_remainder=False)
callbacks.append(BatchLoggerCallback(BATCH_SIZE, train_sample_count))
# train the neural network
model.compile(loss='squared_hinge', optimizer=opt, metrics=['accuracy'])
model.fit(train_dataset, epochs=60, validation_data=validation_dataset, verbose=2, callbacks=callbacks)
Input layer (48 features)
Dense layer (96 neurons)
Dense layer (48 neurons)
Dense layer (24 neurons)
Dense layer (12 neurons)
Output layer (11 classes)
Model
Model version: