ocr.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:OCR 作者: OrangeGuo 项目源码 文件源码
def predict(self, test):
        print('predict')
        y1 = np.dot(np.mat(self.theta1), np.mat(test).T)
        y1 = y1 + np.mat(self.input_layer_bias)  # Add the bias
        y1 = self.sigmoid(y1)

        y2 = np.dot(np.array(self.theta2), y1)
        y2 = np.add(y2, self.hidden_layer_bias)  # Add the bias
        y2 = self.sigmoid(y2)

        results = y2.T.tolist()[0]
        return results.index(max(results))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号