Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you seem to confuse rows and cols a lot here.

your code will thhrow errors, unless you meant:

  • there are 474 features per image (cols in the train / test dataset)
  • there are 256 train images (rows in the train dataset)
  • there are 33 test classes (cols in the ann network output)

and the obvious answer to your problem is:

  1. your network is not large enough to discriminate your data. also aplain "dense" network might be too primitive (cnn's rule, asof today ..)
  2. you do not have enough data to train it. as a rough rule of thumb: multiiply input/output of each layer and sum it up. 474x33 (and that's only a single hidden layer, modern networks have literally hundreds of those ..) would need like 15k images.

you seem to confuse rows and cols a lot here.

your code will thhrow throw errors, unless you meant:

  • there are 474 features per image (cols in the train / test dataset)
  • there are 256 train images (rows in the train dataset)
  • there are 33 test classes (cols in the ann network output)

and the obvious answer to your problem is:

  1. your network is not large enough to discriminate your data. also aplain "dense" network might be too primitive (cnn's rule, asof today ..)
  2. you do not have enough data to train it. as a rough rule of thumb: multiiply input/output of each layer and sum it up. 474x33 (and that's only a single hidden layer, modern networks have literally hundreds of those ..) would need like 15k images.

you seem to confuse rows and cols a lot here.

your code will throw errors, unless you meant:

  • there are 474 features per image (cols in the train / test dataset)
  • there are 256 train images (rows in the train dataset)
  • there are 33 classes (cols in the ann network output)

and the obvious answer to your problem is:

  1. your network is not large enough to discriminate your data. also aplain a plain "dense" network might be too primitive (cnn's rule, asof rule here, as of today ..)
  2. you do not have enough data to train it. as a rough rule of thumb: multiiply input/output of each layer and sum it up. 474x33 (and that's only a single hidden layer, modern networks have literally hundreds of those ..) would need like 15k images.

you seem to confuse rows and cols a lot here.

your code will throw errors, unless you meant:

  • there are 474 features per image (cols in the train / test dataset)
  • there are 256 train images (rows in the train dataset)
  • there are 33 classes (cols in the ann network output)

and the obvious answer to your problem is:

  1. your network is not large enough to discriminate your data. also a plain "dense" network might be too primitive (cnn's rule here, as of today ..)
  2. you do not have enough data to train it. as a rough rule of thumb: multiiply input/output of each hidden layer and sum it up. 474x33 (and that's only a single hidden layer, modern networks have literally hundreds of those ..) would need like 15k images.

you seem to confuse rows and cols a lot here.

your code will throw errors, unless you meant:

  • there are 474 features per image (cols in the train / test dataset)
  • there are 256 train images (rows in the train dataset)
  • there are 33 classes (cols in the ann network output)

and the obvious answer to your problem is:

  1. your network is not large enough to discriminate your data. also a plain "dense" network might be too primitive (cnn's rule here, as of today ..)
  2. you do not have enough data to train it. as a rough rule of thumb: multiiply input/output of each hidden layer and sum it up. 474x33 (and that's only a single hidden layer, modern networks have literally hundreds of those ..) would need like 15k images.256/33 == ~7 images per class. not enough.