0
$\begingroup$

I have two kinds of matrix with 10*10 size, and each number of matrix is 24000, all matrix forms like this: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

and I must classify them with a single convolution layer. the convolution kernel size is 5*5, the strides are 5*6, the final output is 2*1,the Neural network structure below:

X_input = Input(shape=input_shape)
X=Conv2D(1,kernel_size=(5,5),strides=(5,6),use_bias=None)(X_input)
X=Activation('relu')(X)
X=Flatten()(X)
Y=Activation('softmax')(X)
model=Model(inputs=X_input,outputs=Y,name="JSmodel")
return model

and the final accuarcy is 85.6%. However, I'm confused whether I design the neural network is accurate?

$\endgroup$

1 Answer 1

0
$\begingroup$

A Convolution neural network is not justified here.

CNN is used for images because -

  1. Flattening the data can create very high dimensional features

Exerpt from "Hands-on Machine Learning" book -
For example, a 100 × 100–pixel image has 10,000 pixels, and if the first layer has just 1,000 neurons (which already severely restricts the amount of information transmitted to the next layer), this means a total of 10 million connections. 2. Nearby pixels tell a lot about the feature. So by using convolution, Pooling, we are able to reduce the dimension without losing information. The best part is that learning(Identifying the features) is part of Backpropagation 3. Weight sharing reduces the parm count further


In the case mentioned in the question -

  1. Dimension is not so large i.e. 10x10 = 100
  2. Data is sparse and binary. I doubt it can represent spatial features. CNN is not good for sparse dataset.
  3. Only one kernel

I doubt real CNN is happening in the background. You are getting one Feature map and then it is flattened to work as a normal Neural network.

So, it would be better to use a normal neural network
Before that, you should try SVM once as it works well on the sparse dataset. Though data-count is a bit large but can try once.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.