"classes" in Dense(classes, ...)

Hi, in C2_W3_Assignment, the hints for Exercise 3 gave the following code to define the output layer in a neural network:

Dense(classes, activation = 'linear', name = "L3")

But Exercise 3 asks for 6 units for the output layer, and I didn’t see where the value 6 is assigned to “classes”. I’m wondering what “classes” is doing in the code, and how the model knows “classes” is equal to 6?

1 Like

Hi!

The variable classes was defined in section 4.1 Data Set cell 16 where the dataset is made.

X, y, centers, classes, std = gen_blobs()
2 Likes