softmax = function (input) {

  if (!(input instanceof Array))
    throw(TypeError("Input passed into softmax() is not an array. softmax() expects an array. Input: " + input, "nnVizUtils.js"));