neat-python
neat-python copied to clipboard
How can we use neat-python for classification?
trafficstars
Is there any ready-made loss or activation functions (like softmax and cross-entropy)for categorical labels in neat-python?
Or some best practices for classification task?
It seems now I could only do one-hot and cross-entropy in my own?
import numpy as np
from neat.math_util import softmax
...
net_output = net.activate(input_vector)
softmax_result = softmax(net_output)
class_output = np.argmax(((softmax_result / np.max(softmax_result)) == 1).astype(int))