我训练了一个中立的网络,以根据页边距中间的距离和角度预测页面上某个位置的信息。但是对于我没有训练过的数据进行预测,当使用该数据运行网络时,训练模型中没有任何距离和角度,我猜只是随机输出?
下面是一个例子:
{ line: 'Tax', predict: [ sub_total: 0.9999998807907104 ] }
{ line: '$9.50', predict: [ tax: 0.9999759197235107 ] }
{ line:
'Payment is due within 30 days from date of invoice. Late payment is subject to fees of 5% per month.',
predict: [ sub_total: 0.9999998807907104 ] }
{ line: '', predict: [ sub_total: 0.9999998807907104 ] }
{ line: '', predict: [ sub_total: 0.9999998807907104 ] }
{ line: '', predict: [ sub_total: 0.9999998807907104 ] }
{ line: 'info@slicedinvoices.com',
predict: [ sub_total: 0.9999998807907104 ] }
{ line: 'slicedinvoices.com',
predict: [ sub_total: 0.9999998807907104 ] }
{ line: '555 1234 123',
predict: [ sub_total: 0.9999998807907104 ] }
{ line: 'Page 1/1', predict: [ sub_total: 0.9998056888580322 ] }
所以下面您可以看到,所有这些数据都没有在训练模型中,我没有训练过以进行预测,$ 9.5的税款是完全正确的预测,但无论在哪里,其他数据都将预测为小计它放在屏幕上... 无论如何要修复brain.js错误地预测数据? 我的训练模型具有以下结构:
{
"key": "title",
"value": "Invoice",
"top": [
187.48657949037312,
167.1073362689553
],
"bottom": [
311.3688900645021,
-125.94132973440453
],
"left": [
491.7684023117488,
-167.65624617099695
],
"right": [
155.72223961993998,
-42.46212375329803
]
}
然后我将这些值除以1000,然后将它们设为正数,从而使这些值实际上相差很远...