我正在尝试在python中转换matlab的这段代码......
parpool
X = power;
T = coi;
net = feedforwardnet(10);
net = train(net,X,T,'useParallel','no','showResources','yes');
Y = net(X);
figure;
plot(X,T,'o',X,Y,'x');
我尝试了一点,但在训练时遇到了类似断言错误的错误
input_data = power # Power is my input array of length 45
output_data = coi # Coi is my output array of length 60000
h = np.max(input_data )
l = np.min(input_data )
net = nl.net.newff([[l, h]], [1, 1])
error = net.train(input_data, output_data)
out = net.sim(output_data)
Matlab代码正在工作......但我希望同样的事情在python中工作......