Input to reshape is a tensor with 75 values, but the requested shape has 225

Hi
I am trying to classify multi-label image classification using CNN. I have total 5 Labels and each label has a further 3 attributes.

Complete code is here https://drive.google.com/drive/u/1/folders/156Ic6g-Ldcfy0q5B5tdQuZvTKm-xuFPh?usp=sharing

Suppose we have 3 inputs (001, 002 & 003)
and against each input, we have vector y which will look like

X -> Y -> encoded values
001 -> [L, M,L ] -> [ [1,0,0], [0,1,0], [1,0,0] ]
002 -> [H, M,L ] -> [ [0,0,1], [0,1,0], [1,0,0] ]
003 -> [H, H,H ] -> [ [0,0,1], [0,0,1], [0,0,1] ]

on the last layer, I used this

model.add(Dense(5))
model.add(Reshape( (5, 3) ))
model.add(Activation(‘softmax’))

But I am facing error "
InvalidArgumentError: Input to reshape is a tensor with 75 values, but the requested shape has 225"

Kindly guide me here what I am doing wrong

© Copyright 2013-2019 Analytics Vidhya