TypeError: this.set 不是一个函数
作者: maximovicente创建于 2018年9月30日更新于 2018年12月27日
我刚刚要在一个 Node.js 应用中首次测试神经元,所以我从介绍指南中复制了一些基本代码。 存储代码: function Perceptron(input, hidden, output) { // 创建层 var inputLayer = new Layer(input); var hiddenLayer = new Layer(hidden); var outputLayer = new Layer(output); // 连接层 inputLayer.project(hiddenLayer); hiddenLayer.project(outputLayer); // 设置层 this.set({ input: inputLayer, hidden: [hiddenLayer], output: outputLayer }); } 应用运行成功,但当应用尝试创建新的感知器时,它返回"this.set 不是函数"。
内容来源: cazala/synaptic