1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| runfile('D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py', wdir='D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source')
Reloaded modules: edistance, seq2seq, seq2seq.cells, recurrentshop, recurrentshop.engine, recurrentshop.backend, recurrentshop.backend.tensorflow_backend, recurrentshop.generic_utils, recurrentshop.cells, seq2seq.activations_custom, seq2seq.models, network_helper, custom_model
D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source
Build text image generator
Build image list...
0it [00:00, ?it/s]
Split train/val set
#0 training samples before |#0 validation samples
#0 training samples | #0 validation samples
Building model...
Traceback (most recent call last):
File "<ipython-input-10-1da88fdf4160>", line 1, in <module>
runfile('D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py', wdir='D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source')
File "C:\Users\kawther\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "C:\Users\kawther\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py", line 328, in <module>
max_str_len=max_str_len,max_samples=max_samples,batch_memory_usage=batch_memory_usage,use_ctc=use_ctc, **kwargs)
File "D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py", line 195, in train
model, test_func, model_cb = custom_model.get_model(type_model,input_shape,(max_str_len,len(alphabet)), img_gen, **kwargs)
File "D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source\custom_model.py", line 72, in get_model
return Model_Dummy(input_shape, output_shape)
File "D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source\custom_model.py", line 624, in Model_Dummy
input_data_rs = Reshape(target_shape=rs_shape)(input_data)
File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\engine\topology.py", line 603, in __call__
output = self.call(inputs, **kwargs)
File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\layers\core.py", line 393, in call
return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)
File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 1776, in reshape
return tf.reshape(x, shape)
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6481, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 513, in _apply_op_helper
raise err
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 510, in _apply_op_helper
preferred_dtype=default_dtype)
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1146, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 971, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 922, in _autopacking_helper
constant_op.constant(elem, dtype=dtype, name=str(i)))
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 208, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 442, in make_tensor_proto
_AssertCompatible(values, dtype)
File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 353, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got 31.0 of type 'float' instead. |
Partager