Comments (7)
when i run train.py,another error encounted:
python train.py /home/cs316/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from
floatto
np.floatingis deprecated. In future, it will be treated as
np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters INFO:tensorflow:Using config: {'_model_dir': '../data/model', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 120, '_session_config': allow_soft_placement: true , '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f1fac3ceda0>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1} Traceback (most recent call last): File "train.py", line 182, in <module> tf.app.run() File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "train.py", line 179, in main classifier.train( input_fn=_get_input, max_steps=FLAGS.max_num_steps ) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 356, in train loss = self._train_model(input_fn, hooks, saving_listeners) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1181, in _train_model return self._train_model_default(input_fn, hooks, saving_listeners) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1208, in _train_model_default input_fn, model_fn_lib.ModeKeys.TRAIN)) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1049, in _get_features_and_labels_from_input_fn self._call_input_fn(input_fn, mode)) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 1136, in _call_input_fn return input_fn(**kwargs) File "train.py", line 130, in _get_input dataset = pipeline.get_data( FLAGS.static_data, **data_args) File "/home/cs316/lijian/cnn_lstm_ctc_ocr-master/src/pipeline.py", line 79, in get_data dataset = dpipe.get_dataset( dpipe_args ) File "/home/cs316/lijian/cnn_lstm_ctc_ocr-master/src/mjsynth.py", line 60, in get_dataset buffer_size=buffer_sz ) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/readers.py", line 212, in __init__ prefetch_input_elements=None) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/readers.py", line 128, in __init__ cycle_length, block_length) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2312, in __init__ super(InterleaveDataset, self).__init__(input_dataset, map_func) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2275, in __init__ experimental_nested_dataset_support=True) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1473, in __init__ self._function.add_to_graph(ops.get_default_graph()) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/function.py", line 479, in add_to_graph self._create_definition_if_needed() File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/function.py", line 335, in _create_definition_if_needed self._create_definition_if_needed_impl() File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/function.py", line 344, in _create_definition_if_needed_impl self._capture_by_value, self._caller_device) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/function.py", line 865, in func_graph_from_py_func outputs = func(*func_graph.inputs) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1411, in tf_data_structured_function_wrapper ret = func(*nested_args) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/readers.py", line 204, in read_one_file return _TFRecordDataset(filename, compression_type, buffer_size) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/ops/readers.py", line 102, in __init__ argument_default=_DEFAULT_READER_BUFFER_SIZE_BYTES) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/data/util/convert.py", line 32, in optional_param_to_tensor argument_value, dtype=argument_dtype, name=argument_name) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1048, in convert_to_tensor as_ref=False) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1144, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 228, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 207, in constant value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 442, in make_tensor_proto _AssertCompatible(values, dtype) File "/home/cs316/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 353, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).__name__)) TypeError: Expected int64, got 64.0 of type 'float' instead. cs316@cs316-ProLiant-ML350-Gen9:~/lijian/cnn_lstm_ctc_ocr-master/src$ python Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux
from cnn_lstm_ctc_ocr.
Thank you for the report. I believe TF 1.2 is far too old a version to use for this package. You should upgrade to at least 1.10 (1.11 if you want to train with multiple GPUs).
If that's impossible and you're determined to use this software, you can try the old version (checkout tag tf-1.2
) which is radically different in I/O structure (see HISTORY)
from cnn_lstm_ctc_ocr.
Also, the scripts are written for Python 2.7; I have no idea whether they will work in Python3.
from cnn_lstm_ctc_ocr.
@weinman
thanks for your answer!
i have solved the first error,but i got another error when i run train.py.the error just like the second question above.
run in linux,python3.6,tensorflow 1.10.
from cnn_lstm_ctc_ocr.
I don't have time right now to dig deeply into this, but it looks like maybe a problem with Tensorflow's Python3 version, rather than a problem with this particular repo's code. Can you try with Python2.7?
from cnn_lstm_ctc_ocr.
@weinman
I have solved it by try with Python2.7.Thank you!
from cnn_lstm_ctc_ocr.
Thanks for following up.
from cnn_lstm_ctc_ocr.
Related Issues (20)
- Training error HOT 9
- How to deal with single character input HOT 2
- Using Multiple GPU as a train_device HOT 3
- ctc_loss_calculator.cc Not a valid path HOT 3
- are there any pretrain model file HOT 3
- Input shapes: [72,357,1], [4] and with input tensors computed HOT 3
- It's possible to use a pre-trained model? HOT 1
- CuDnn 7.2.1 HOT 1
- get not good result, HOT 2
- FineTune ! HOT 3
- Model learns nothing about certain characters. HOT 1
- TypeError HOT 4
- Fixed sequence length HOT 1
- Training Error when using my data HOT 1
- 0% GPU-Util when testing HOT 1
- Train on vertical patches HOT 1
- Question Regarding End Model HOT 3
- confidence on sess passing HOT 6
- How to convert .ckpt model to SavedModel .pb format for hosting with Tensorflow Model Serving? HOT 6
- How to batch inference? HOT 5
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 cnn_lstm_ctc_ocr.