我刚刚安装了Neurolab,并尝试了一个提供的示例(前馈多层感知器(newff)):
import neurolab as nl
import numpy as np
# Create train samples
x = np.linspace(-7, 7, 20)
y = np.sin(x) * 0.5
size = len(x)
inp = x.reshape(size,1)
tar = y.reshape(size,1)
# Create network with 2 layers and random initialized
net = nl.net.newff([[-7,