神经网络,要求完成推理过程并得到测试数据集识别结果
相关代码及报错内容,如下
NameError Traceback (most recent call last)
<ipython-input-11-9b3e3d5b2dd6> in <module>()
1 x,t = get_data()
----> 2 network = init_network()
3 accuracy_cnt = 0
4 for i in range(len(x)):
5 y = predice(network, x[i])
<ipython-input-8-a253d960dda4> in init_network()
5 def init_network():
6 with open("sample_weight.pkl",'rb') as f:
----> 7 network = pickle.load(f)
8 return network
9
NameError: name 'pickle' is not defined
这报错是啥意思啊?该怎么解决呢?代码是发的,不会有错,可是为什么我运行不了?求解,谢谢!