I want to create and train a CNN model in Keras for classification of banknotes. Creating models works fine with simple tutorials but not with the architecture I adopt from
Found my mistake - explanation for future reference.
The error origniates back in compile()
where the first if-statement says:
if not self.built:
# Model is not compilable because
# it does not know its number of inputs
# and outputs, nor their shapes and names.
# We will compile after the first
# time the model gets called on training data.
return
So I specified input_shape=
and input_format=
in the first Conv2D
layer and everything works fine.