Tensorflow2.0中文手写字识别
跑了1个Epoch后报错“UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 177: invalid continuation byte” 请问有人遇见过这个问题吗?(win10系统)
-
Tensorflow2.0中文手写字识别 UnicodeDecodeError
-
刘看山 |
@VincentKan 牛逼
-
我生成了两个tfrecord ,但是运行train_smiple.py的时候还是报了错:
Traceback (most recent call last): File "train_simple.py", line 120, in <module> train() File "train_simple.py", line 49, in train for data in train_dataset.take(2): File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 736, in __next__ return self.next() File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 772, in next return self._next_internal() File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 764, in _next_internal return structure.from_compatible_tensor_list(self._element_spec, ret) File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/site-packages/tensorflow/python/eager/context.py", line 2105, in execution_mode executor_new.wait() File "/home/wupeng/anaconda3/envs/tf2/lib/python3.7/site-packages/tensorflow/python/eager/executor.py", line 67, in wait pywrap_tfe.TFE_ExecutorWaitForAllPendingNodes(self._handle) tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 7830 values, but the requested shape has 4096 [[{{node Reshape}}]]
-
pff012 |
@VincentKan 您好,我也报跟您一样的错,然后也照您最后提示的进行生成,但是最后还是报这个错, 这可咋搞?
您有微信号或者qq号吗? 想请教您一下。 -
erik-pb |
本人小小白,实在没有找到convert to tfrecord中在哪更改路径,请问一下在哪里更改路径来生成tfrecord,万分感谢
-
Zed-Wang |
在平台上找了很久没有找到关于Tensorflow2.0中文手写字识别的文章,可以不吝告诉下地址吗?
-
@xinzaiyan 在 Tensorflow2.0中文手写字识别 UnicodeDecodeError 中说:
@VincentKan 请问你这个问题怎么解决的呀,我也遇到了
问题都出在生成TFrecord的程序中,正确的数据准备结构如下图:注意HWDB的文件夹位置,然后在跑程序的时候,参数设置好:
-
@VincentKan 请问你这个问题怎么解决的呀,我也遇到了
-
Jarvis |
@VincentKan Congratulations!
Glad to hear you succeed running the codes. Your advise is useful for many other beginners! -
已经解决,目前项目可以正常学习了。
问题在于:作者在项目介绍中有几个疏漏:
1、使用的数据是1.1版本,并不是1.0版本
2、运行convert to tfrecord程序时,要运行两次,分别给训练集和测试集的地址,这样才能生成出2个tfrecord
3、如果大家下载是从文章中的链接下载了原始数据,那么一定要把路径设置正确,不能直接运行程序生成tfrecord文件
以上,祝各位也能成功~
BTW,我跑了50个epoch,训练集已经90%的准确率了,还不错哦~ 接下来可以开始网络模型设计了!