Every classification loss takes labels as a matrix of zeros and ones, not as a list of class numbers. Writing the conversion once is how you learn what fancy indexing is for.
Write one_hot(labels, n_classes).
labels is a sequence of integers in [0, n_classes). Return a float array of shape (len(labels), n_classes) where row i has a 1.0 in column labels[i] and 0.0 everywhere else.
Do it without a Python loop over the labels. NumPy can index with two arrays at once, and that is the whole exercise.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen