Git Product home page Git Product logo

Comments (7)

lijian-1994 avatar lijian-1994 commented on June 1, 2024

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 fromfloattonp.floatingis deprecated. In future, it will be treated asnp.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.

weinman avatar weinman commented on June 1, 2024

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.

weinman avatar weinman commented on June 1, 2024

Also, the scripts are written for Python 2.7; I have no idea whether they will work in Python3.

from cnn_lstm_ctc_ocr.

lijian-1994 avatar lijian-1994 commented on June 1, 2024

@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.

weinman avatar weinman commented on June 1, 2024

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.

lijian-1994 avatar lijian-1994 commented on June 1, 2024

@weinman
I have solved it by try with Python2.7.Thank you!

from cnn_lstm_ctc_ocr.

weinman avatar weinman commented on June 1, 2024

Thanks for following up.

from cnn_lstm_ctc_ocr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.