dddd_trainer
dddd_trainer copied to clipboard
训练测试集一段时间报错
在训练模型的时候 训练一段时间会出现
UserWarning: Exporting a model to ONNX with a batch_size other than 1, with a variable length with LST
M can cause an error when running the ONNX model with a different batch size. Make sure to save the model with a batch size of 1, or define the initial states (h0/c0) as inputs of the mo
del.
按照教程安装的 包 使用的数据集是 测试二 的那个数据集。
配置文件如下
Model: CharSet: [' ', S, '4', F, X, '9', E, Q, V, U, '1', J, R, '5', '7', Z, H, G, P, A, '2', '6', '8', Y, B, I, L, W, K, T, D, C, '3'] ImageChannel: 1 ImageHeight: 32 ImageWidth: -1 Word: false System: Allow_Ext: [jpg, jpeg, png, bmp] GPU: true GPU_ID: 0 Path: images Project: my_test Val: 0.03 Train: BATCH_SIZE: 16 CNN: {NAME: ddddocr} DROPOUT: 0.3 LR: 0.01 OPTIMIZER: SGD SAVE_CHECKPOINTS_STEP: 2000 TARGET: {Accuracy: 0.97, Cost: 0.05, Epoch: 20} TEST_BATCH_SIZE: 16 TEST_STEP: 1000