function flatOneHot(label, numClasses) {
    var labelOneHot = new Array(numClasses).fill(0);
    labelOneHot[label] = 1;
    return labelOneHot;
}
/**
 * Converts an integer into its one-hot representation and returns
 * the data as a JS Array.
 */
Converts an integer into its one-hot representation and returns
the data as a JS Array.
Converts an integer into its one - hot representation and returns the data as a JS Array .
function flatOneHot(label, numClasses) {
    var labelOneHot = new Array(numClasses).fill(0);
    labelOneHot[label] = 1;
    return labelOneHot;
}
function flatOneHot ( label , numClasses ) { var labelOneHot = new Array ( numClasses ) . fill ( 0 ) ; labelOneHot [ label ] = 1 ; return labelOneHot ; }
Converts an integer into its one-hot representation and returns
 the data as a JS Array.
Converts an integer into its one - hot representation and returns the data as a JS Array .