Implement a CNN with two hidden layers and ReLU activation.
CNN(X,y,X_new,plot.figure = FALSE)A list of matrix-valued predictors.
Binary response variable.
A list of new matrices in the test data.
Option for plotting trajectory of accuracy over epochs.
The returned object is a list of components.
prob - The predicted probabilities for the test data.
class - The estimated binary response for the test data.
history - The trajectory of classification accuracy over epochs.
acc - The classification accuracy on test data.