githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 893 forks source link

ValueError: None values not supported. #20

Closed rushaligupta closed 6 years ago

rushaligupta commented 6 years ago
  1. Versions

    • TensorFlow version : 1.0.0
    • Python version :3.5.2
    • Operating system : windows 8.1, 64 bit
  2. Issue

    • Which result/error did you get?

ValueError: None values not supported. On executing the main.py file, i'm getting the following error:

C:\Users\My Pc\Downloads\SimpleHTR-master\SimpleHTR-master\src>python main.py Validation character error rate of saved model: 13.956289% E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') fo r unknown op: BestSplits E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_t ype: "CPU"') for unknown op: CountExtremelyRandomStats E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_ty pe: "CPU"') for unknown op: ReinterpretStringToFloat E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"' ) for unknown op: ScatterAddNdim E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') fo r unknown op: TopNInsert E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') fo r unknown op: TopNRemove E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU" ') for unknown op: TreePredictions E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core \framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "C PU"') for unknown op: UpdateFertileSlots Traceback (most recent call last): File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\op_def_libra ry.py", line 491, in apply_op preferred_dtype=default_dtype) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\ops.py", lin e 716, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\constant_op. py", line 176, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\constant_op. py", line 165, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape= verify_shape)) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\tensor_util. py", line 360, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 139, in main() File "main.py", line 134, in main model = Model(open(FilePaths.fnCharList).read(), decoderType, mustRestore=Tr ue) File "C:\Users\My Pc\Downloads\SimpleHTR-master\SimpleHTR-master\src\Model.py" , line 31, in init rnnOut3d = self.setupRNN(cnnOut4d) File "C:\Users\My Pc\Downloads\SimpleHTR-master\SimpleHTR-master\src\Model.py" , line 79, in setupRNN ((fw, bw), _) = tf.nn.bidirectional_dynamic_rnn(cell_fw=stacked, cell_bw=sta cked, inputs=rnnIn3d, dtype=rnnIn3d.dtype) File "C:\Python-3.5\lib\site-packages\tensorflow\python\ops\rnn.py", line 363, in bidirectional_dynamic_rnn seq_dim=time_dim, batch_dim=batch_dim) File "C:\Python-3.5\lib\site-packages\tensorflow\python\ops\array_ops.py", lin e 2346, in reverse_sequence name=name) File "C:\Python-3.5\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 2776, in reverse_sequence batch_dim=batch_dim, name=name) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\op_def_libra ry.py", line 504, in apply_op values, as_ref=input_arg.is_ref).dtype.name File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\ops.py", lin e 716, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\constant_op. py", line 176, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\constant_op. py", line 165, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape= verify_shape)) File "C:\Python-3.5\lib\site-packages\tensorflow\python\framework\tensor_util. py", line 360, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

githubharald commented 6 years ago

never tried it with TF 1.0 - I tested it with TF 1.3 So the first thing I would try is to switch to 1.3 and see what happens.

githubharald commented 6 years ago

Closing because of inactivity.