"Target: This block needs a shape of..." Error

I have an error saying: “Target: This block needs a shape of . Update the previous blocks OR change the target feature to match the shape.”

What should I do?

Nice to see that you’re trying to build models on your own :slight_smile:

The “Target shape” error message appears when the last block of the model graph (often a Dense block) doesn’t output data in the same shape as the shape of the feature that is used in the Target block.

This can usually be fixed easily by changing the number of Nodes inside the last dense block to match the Target block. For example, if the Target uses a Numeric feature, the Dense block just before the Target should use 1 Node (corresponding to 1 numeric value).

If the target uses a Categorical feature with, for instance, 3 categories, then the last Dense block should use 3 Nodes (corresponding to the probabilities for 3 categories).

Let me know if It it doesn’t work!


1 Like