def softmax_cost(theta, num_classes, input_size, lambda_, data, labels):
    m = data.shape[1]
    theta = theta.reshape(num_classes, input_size)
    theta_data = theta.dot(data)
    theta_data = theta_data - np.max(theta_data)
    prob_data = np.exp(theta_data) / np.sum(np.exp(theta_data), axis=0)
    indicator = scipy.sparse.csr_matrix((np.ones(m), (labels, np.array(range(m)))))
    indicator = np.array(indicator.todense())
    cost = (-1 / m) * np.sum(indicator * np.log(prob_data)) + (lambda_ / 2) * np.sum(theta * theta)

    grad = (-1 / m) * (indicator - prob_data).dot(data.transpose()) + lambda_ * theta

    return cost, grad.flatten()
Creates a bootstrap script, which is like this script but with
dataset/ETHPy150Open jatinshah/ufldl_tutorial/softmax.py/softmax_cost--crossover with--dataset/ETHPy150Open femmerling/backyard/virtualenv.py/create_bootstrap_script