hyperparameters
hyperparameters copied to clipboard
.choice() - option to actually return the choice?
I am using the choice
function in the following way:
this.squash = hpjs.choice(methods.activation);
However, the choice function returns an object, the documentation makes out as if a random element in the array is returned. Am I misusing the function?
NB: I know that this could be achieved manually, but I am using the library so it makes sense to utilise functions that are available. The manual way could be:
this.squash = methods.activation[Object.keys(methods.activation)[Math.floor(Math.random() * Object.keys(methods.activation).length)]];