Comments (9)
使用的是绝对路径。图片读取,label读取是正确的。。。,
from pytorchocr.
麻烦查看下你的卷积层中哪个环节数据错了。你这个大概率就是图片加载错误,或者其他类型的错误。简而言之输入到网络中的图大概率有nan
from pytorchocr.
麻烦查看下你的卷积层中哪个环节数据错了。你这个大概率就是图片加载错误,或者其他类型的错误。简而言之输入到网络中的图大概率有nan
数据集加载没有问题,此外,换了数据集,换成IIIT5K数据集,训练准确率也是一直都是000000000
from pytorchocr.
那你能debug看下是哪个环节不正常的吗?你这样说我们没法判断。 @cendelian
from pytorchocr.
建议先使用数据数据集看看,IIIT5K数据集太小,欠拟合也正常
from pytorchocr.
建议先使用数据数据集看看,IIIT5K数据集太小,欠拟合也正常
我打印输出如下:
class RecMetric:
def __init__(self, converter):
"""
文本识别相关指标计算类
:param converter: 用于label转换的转换器
"""
self.converter = converter
def __call__(self, predictions, labels):
n_correct = 0
norm_edit_dis = 0.0
predictions = predictions.softmax(dim=2).detach().cpu().numpy()
# print('prediction is {}'.format(predictions))
preds_str = self.converter.decode(predictions)
print('preds_str is {}'.format(preds_str))
训练一开始 pred_str有数据,过了两三次就输出都是空
。
我的digit.txt 一共有62个字符(IIIT5K 62个字符)如下:
from pytorchocr.
那你能debug看下是哪个环节不正常的吗?你这样说我们没法判断。 @cendelian
大佬,rec_train.py是不是有bug?。。
梯度清零可以在模型推理前吗?
我把 # 清零梯度及反向传播
optimizer.zero_grad()
移至
loss_dict['loss'].backward()
torch.nn.utils.clip_grad_norm_(net.parameters(), 5)
前
训练就不是准确率一直为0了,,,,
from pytorchocr.
那你能debug看下是哪个环节不正常的吗?你这样说我们没法判断。 @cendelian
大佬,rec_train.py是不是有bug?。。
梯度清零可以在模型推理前吗?我把 # 清零梯度及反向传播
optimizer.zero_grad()
移至
loss_dict['loss'].backward()
torch.nn.utils.clip_grad_norm_(net.parameters(), 5)
前
训练就不是准确率一直为0了,,,,
请问移动后代码是怎样的?可以说详细点吗
from pytorchocr.
那你能debug看下是哪个环节不正常的吗?你这样说我们没法判断。 @cendelian
大佬,rec_train.py是不是有bug?。。
梯度清零可以在模型推理前吗?
我把 # 清零梯度及反向传播
optimizer.zero_grad()
移至
loss_dict['loss'].backward()
torch.nn.utils.clip_grad_norm_(net.parameters(), 5)
前
训练就不是准确率一直为0了,,,,
请问移动后代码是怎样的?可以说详细点吗
我发现跟这个没有关系。。。。。训练几轮准确率就有变化,,,,准确率很高,但是评估的时候很不准。。。。。。。。。
from pytorchocr.
Related Issues (20)
- 有没有Int版本的模型
- ValueError: num_samples should be a positive integer value, but got num_samples=0
- 如何在ocr识别的字典文件中添加上下标的训练素材
- python tools/infer_rec.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml HOT 6
- 请问目前转换成onnx格式推理的功能可以使用了吗 HOT 3
- 请问cls的模型有开源参数吗 HOT 2
- 在det模型中,如何调节检测框之间合并的间距阈值
- use the comand to run the train report the warning,any one have the same warning? HOT 1
- 训练ch_PP-OCRv3_rec不收敛,CTCLOSS到50就不降了 HOT 1
- ch_ppocr_mobile_v2.0_cls_train 的 config文件是不是没上传? HOT 3
- cls_mv3 模型权重是不是忘了上传了? 链接里没有 HOT 2
- 为什么新样本首次推理速度都会慢? HOT 4
- 文字识别模型的训练数据来源 HOT 3
- predict部分需要三个模型是什么情况? HOT 2
- 检测模型pth转换为onnx报错,configs\det\ch_PP-OCRv3\ch_PP-OCRv3_det_student.yml,
- 训练好的paddle模型,迁移到torch,又转onnx,进行推理为什么都识别不出来东西 HOT 1
- 大佬你好 ,想问个关于模型大小的问题 HOT 1
- 转trt HOT 1
- onnx2trt HOT 1
- 关于paddleocr库代码中使用这个配置ch_PP-OCRv4_rec_distill.yml进行文本识别训练代码bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorchocr.