下記に示す通り、newlvqでエラーが発生し進めないので、ご教授願いたい。
pip3
1 2Package Version 3-------------------- ------- 4absl-py 0.8.0 5astor 0.8.0 6cycler 0.10.0 7gast 0.3.2 8google-pasta 0.1.7 9grpcio 1.23.0 10h5py 2.10.0 11Keras-Applications 1.0.8 12Keras-Preprocessing 1.1.0 13kiwisolver 1.1.0 14Markdown 3.1.1 15matplotlib 3.1.1 16neurolab 0.3.5 17numpy 1.16.5 18pip 19.2.3 19protobuf 3.9.1 20pyparsing 2.4.2 21python-dateutil 2.8.0 22setuptools 41.2.0 23six 1.12.0 24tensorboard 1.14.0 25tensorflow 1.14.0 26tensorflow-estimator 1.14.0 27termcolor 1.1.0 28Werkzeug 0.15.6 29wheel 0.33.6 30wrapt 1.11.2 31
data
164.0,64.0,0,1,0,1 264.0,64.0,0,0,1,0 332.0,64.0,0,0,0,1 432.0,64.0,0,1,0,1 532.0,64.0,1,0,0,0 632.0,64.0,0,1,0,1 764.0,32.0,0,0,1,1 864.0,32.0,0,0,1,1 964.0,32.0,0,0,1,0 1064.0,32.0,0,1,1,1 1132.0,32.0,0,1,0,0 1232.0,32.0,1,0,0,0 1316.0,32.0,0,0,0,0 1416.0,32.0,0,0,1,0 1516.0,32.0,1,0,0,0 1616.0,32.0,0,0,0,1...
python
1 text = np.loadtxt('outPut.csv', delimiter=',') 2 FEATURE = text[:, :2] 3 LABEL = text[:, 2:] 4 5 input_neurons = 10 6 output_neurons = 4 7 8 weights = [1 / output_neurons] * output_neurons 9 10 NN = nl.net.newlvq(nl.tool.minmax(FEATURE), input_neurons, weights) 11 12 NN.train(FEATURE, LABEL, epochs=500, goal=-1) 13
log
1Traceback (most recent call last): 2 File "<input>", line 1, in <module> 3 File "/Applications/Jetbrains/apps/PyCharm-P/ch-0/192.6603.34/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile 4 pydev_imports.execfile(filename, global_vars, local_vars) # execute the script 5 File "/Applications/Jetbrains/apps/PyCharm-P/ch-0/192.6603.34/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile 6 exec(compile(contents+"\n", file, 'exec'), glob, loc) 7 File "/Users/azuma.t/git/tensorflow-hevc/20190917.py", line 61, in <module> 8 NN = nl.net.newlvq(nl.tool.minmax(FEATURE), input_neurons, weights) 9 File "/Users/azuma.t/py3.7/lib/python3.7/site-packages/neurolab/net.py", line 179, in newlvq 10 layer_out.np['w'][n][st:i].fill(1.0) 11TypeError: slice indices must be integers or None or have an __index__ method
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。