Closed monomon closed 4 years ago
/CC @jch1, can you fix this?
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
I get the same error:
INFO:tensorflow:loss = 0.365541, step = 2118 (108.686 sec)
I0302 04:30:12.375137 139849259779904 basic_session_run_hooks.py:260] loss = 0.365541, step = 2118 (108.686 sec)
INFO:tensorflow:global_step/sec: 0.95334
I0302 04:31:57.268882 139849259779904 basic_session_run_hooks.py:692] global_step/sec: 0.95334
INFO:tensorflow:loss = 0.0513791, step = 2218 (104.894 sec)
I0302 04:31:57.269407 139849259779904 basic_session_run_hooks.py:260] loss = 0.0513791, step = 2218 (104.894 sec)
INFO:tensorflow:global_step/sec: 0.952867
I0302 04:33:42.215290 139849259779904 basic_session_run_hooks.py:692] global_step/sec: 0.952867
INFO:tensorflow:loss = 0.91536176, step = 2318 (104.947 sec)
I0302 04:33:42.216015 139849259779904 basic_session_run_hooks.py:260] loss = 0.91536176, step = 2318 (104.947 sec)
INFO:tensorflow:Saving checkpoints for 2374 into training/model.ckpt.
I0302 04:34:40.891496 139849259779904 basic_session_run_hooks.py:606] Saving checkpoints for 2374 into training/model.ckpt.
WARNING:tensorflow:From /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py:963: remove_checkpoint (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to delete files with this prefix.
W0302 04:34:40.957309 139849259779904 deprecation.py:323] From /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py:963: remove_checkpoint (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to delete files with this prefix.
INFO:tensorflow:Calling model_fn.
I0302 04:34:42.004164 139849259779904 estimator.py:1148] Calling model_fn.
INFO:tensorflow:Scale of 0 disables regularizer.
I0302 04:34:43.114418 139849259779904 regularizers.py:98] Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
I0302 04:34:43.125037 139849259779904 regularizers.py:98] Scale of 0 disables regularizer.
INFO:tensorflow:depth of additional conv before box predictor: 0
I0302 04:34:43.125357 139849259779904 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0
INFO:tensorflow:Scale of 0 disables regularizer.
I0302 04:34:43.907465 139849259779904 regularizers.py:98] Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
I0302 04:34:43.919048 139849259779904 regularizers.py:98] Scale of 0 disables regularizer.
WARNING:tensorflow:From /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/util/dispatch.py:180: batch_gather (from tensorflow.python.ops.array_ops) is deprecated and will be removed after 2017-10-25.
Instructions for updating:
tf.batch_gather
is deprecated, please use tf.gather
with batch_dims=-1
instead.
W0302 04:34:44.250046 139849259779904 deprecation.py:323] From /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/util/dispatch.py:180: batch_gather (from tensorflow.python.ops.array_ops) is deprecated and will be removed after 2017-10-25.
Instructions for updating:
tf.batch_gather
is deprecated, please use tf.gather
with batch_dims=-1
instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/eval_util.py:796: to_int64 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast
instead.
W0302 04:34:44.789323 139849259779904 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/eval_util.py:796: to_int64 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast
instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/visualization_utils.py:498: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
options available in V2.
tf.py_function
s can use accelerators such as GPUs as well as
being differentiable using a gradient tape.W0302 04:34:44.925954 139849259779904 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/visualization_utils.py:498: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version. Instructions for updating: tf.py_func is deprecated in TF V2. Instead, there are two options available in V2.
tf.py_function
s can use accelerators such as GPUs as well as
being differentiable using a gradient tape.WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/visualization_utils.py:1044: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.
W0302 04:34:45.028621 139849259779904 module_wrapper.py:139] From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/visualization_utils.py:1044: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/model_lib.py:484: The name tf.metrics.mean is deprecated. Please use tf.compat.v1.metrics.mean instead.
W0302 04:34:45.087543 139849259779904 module_wrapper.py:139] From /usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/model_lib.py:484: The name tf.metrics.mean is deprecated. Please use tf.compat.v1.metrics.mean instead.
INFO:tensorflow:Done calling model_fn. I0302 04:34:45.314840 139849259779904 estimator.py:1150] Done calling model_fn. INFO:tensorflow:Starting evaluation at 2020-03-02T04:34:45Z I0302 04:34:45.326640 139849259779904 evaluation.py:255] Starting evaluation at 2020-03-02T04:34:45Z INFO:tensorflow:Graph was finalized. I0302 04:34:45.638996 139849259779904 monitored_session.py:240] Graph was finalized. 2020-03-02 04:34:45.639936: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2020-03-02 04:34:45.640525: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.455 pciBusID: 0000:01:00.0 2020-03-02 04:34:45.640701: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.640806: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.640880: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.640924: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.641039: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.641109: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory 2020-03-02 04:34:45.641124: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2020-03-02 04:34:45.641130: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-03-02 04:34:45.641141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-03-02 04:34:45.641146: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2020-03-02 04:34:45.641152: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N INFO:tensorflow:Restoring parameters from training/model.ckpt-2374 I0302 04:34:45.641930 139849259779904 saver.py:1284] Restoring parameters from training/model.ckpt-2374 INFO:tensorflow:Running local_init_op. I0302 04:34:46.374262 139849259779904 session_manager.py:500] Running local_init_op. INFO:tensorflow:Done running local_init_op. I0302 04:34:46.488706 139849259779904 session_manager.py:502] Done running local_init_op. INFO:tensorflow:Performing evaluation on 130 images. I0302 04:35:39.281298 139844202264320 coco_evaluation.py:205] Performing evaluation on 130 images. creating index... index created! INFO:tensorflow:Loading and preparing annotation results... I0302 04:35:39.284096 139844202264320 coco_tools.py:115] Loading and preparing annotation results... INFO:tensorflow:DONE (t=0.02s) I0302 04:35:39.305804 139844202264320 coco_tools.py:137] DONE (t=0.02s) creating index... index created! 2020-03-02 04:35:39.325579: W tensorflow/core/framework/op_kernel.cc:1639] Invalid argument: TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. Traceback (most recent call last):
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 117, in linspace num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 384, in first_value_func self._metrics = self.evaluate()
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 215, in evaluate coco_wrapped_groundtruth, coco_wrapped_detections, agnostic_mode=False)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_tools.py", line 176, in init iouType=iou_type)
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 76, in init self.params = Params(iouType=iouType) # parameters
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 527, in init self.setDetParams()
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 507, in setDetParams self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
File "<__array_function__ internals>", line 6, in linspace
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 121, in linspace .format(type(num)))
TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
Traceback (most recent call last): File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.OutOfRangeError: End of sequence [[{{node IteratorGetNext}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/evaluation.py", line 272, in _evaluate_once session.run(eval_ops, feed_dict) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 754, in run run_metadata=run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1259, in run run_metadata=run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1360, in run raise six.reraise(original_exc_info) File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise raise value File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1345, in run return self._sess.run(args, *kwargs) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1418, in run run_metadata=run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/training/monitored_session.py", line 1176, in run return self._sess.run(args, **kwargs) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run run_metadata_ptr) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run feed_dict_tensor, options, run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.OutOfRangeError: End of sequence [[node IteratorGetNext (defined at /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]
Original stack trace for 'IteratorGetNext':
File "model_main.py", line 114, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. Traceback (most recent call last):
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 117, in linspace num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 384, in first_value_func self._metrics = self.evaluate()
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 215, in evaluate coco_wrapped_groundtruth, coco_wrapped_detections, agnostic_mode=False)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_tools.py", line 176, in init iouType=iou_type)
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 76, in init self.params = Params(iouType=iouType) # parameters
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 527, in init self.setDetParams()
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 507, in setDetParams self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
File "<__array_function__ internals>", line 6, in linspace
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 121, in linspace .format(type(num)))
TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
[[{{node PyFunc_3}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "model_main.py", line 114, in
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 117, in linspace num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call ret = func(*args)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 384, in first_value_func self._metrics = self.evaluate()
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_evaluation.py", line 215, in evaluate coco_wrapped_groundtruth, coco_wrapped_detections, agnostic_mode=False)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/metrics/coco_tools.py", line 176, in init iouType=iou_type)
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 76, in init self.params = Params(iouType=iouType) # parameters
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 527, in init self.setDetParams()
File "/home/ricardo/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 507, in setDetParams self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
File "<__array_function__ internals>", line 6, in linspace
File "/home/ricardo/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 121, in linspace .format(type(num)))
TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
[[node PyFunc_3 (defined at /home/ricardo/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]
Original stack trace for 'PyFunc_3':
File "model_main.py", line 114, in
This issue has been solved here - https://github.com/rbgirshick/py-faster-rcnn/issues/481
In https://github.com/rbgirshick/py-faster-rcnn/issues/481 propose to switch to numpy 1.11.0, that is incompatible with tensorflow 1.15. There is a better fix?
@EnricoBeltramo Was stuck with the same issue for a long time. I fixed it by downgrading to numpy 1.17.4. This works with tensorflow 1.15.2. Check out https://stackoverflow.com/questions/54099081/how-to-fix-numpy-float64-object-cannot-be-interpreted-as-an-integer.
%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)
!pip install numpy==1.17.4
Hope that works for you as well!
my error is TypeError: 'numpy.float64' object cannot be interpreted as an integer. how to solve it ...
help me please
my error is TypeError: 'numpy.float64' object cannot be interpreted as an integer. how to solve it ...
help me please
Same error here
downgrade numpy to 1.16
@revrr solution worked for me just do pip install numpy==1.16
1.17.1 seems to work also - at least it does for me
FYI to anyone whos having issues with packages. Here is my list of install packages which is currently working for me with Anaconda `# packages in environment at C:\Users\steve\Anaconda3\envs\tensorflow_gpu: #
absl-py 0.9.0 pypi_0 pypi
astor 0.8.1 pypi_0 pypi
attrs 19.3.0 py_0 conda-forge
backcall 0.1.0 py_0 conda-forge
blas 1.0 mkl
bleach 3.1.5 pyh9f0ad1d_0 conda-forge
ca-certificates 2020.4.5.1 hecc5488_0 conda-forge
certifi 2020.4.5.1 py37hc8dfbb8_0 conda-forge
colorama 0.4.3 py_0 conda-forge
cycler 0.10.0 py_2 conda-forge
cython 0.29.17 py37h1834ac0_0 conda-forge
decorator 4.4.2 py_0 conda-forge
defusedxml 0.6.0 py_0 conda-forge
entrypoints 0.3 py37hc8dfbb8_1001 conda-forge
freetype 2.10.1 ha9979f8_0 conda-forge
gast 0.3.3 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.28.1 pypi_0 pypi
h5py 2.10.0 pypi_0 pypi
hdf5 1.8.20 hac2f561_1
icc_rt 2019.0.0 h0cc432a_1
icu 64.2 he025d50_1 conda-forge
importlib-metadata 1.6.0 py37hc8dfbb8_0 conda-forge
importlib_metadata 1.6.0 0 conda-forge
intel-openmp 2020.0 166
ipykernel 5.2.1 py37h5ca1d4c_0 conda-forge
ipython 7.14.0 py37hc8dfbb8_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 7.5.1 py_0 conda-forge
jedi 0.17.0 py37hc8dfbb8_0 conda-forge
jinja2 2.11.2 pyh9f0ad1d_0 conda-forge
jpeg 9c hfa6e2cd_1001 conda-forge
jsonschema 3.2.0 py37hc8dfbb8_1 conda-forge
jupyter 1.0.0 py_2 conda-forge
jupyter_client 6.1.3 py_0 conda-forge
jupyter_console 6.1.0 py_1 conda-forge
jupyter_core 4.6.3 py37hc8dfbb8_1 conda-forge
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.0 pypi_0 pypi
kiwisolver 1.2.0 py37heaa310e_0 conda-forge
libblas 3.8.0 15_mkl conda-forge
libcblas 3.8.0 15_mkl conda-forge
libclang 9.0.1 default_hf44288c_0 conda-forge
libiconv 1.15 hfa6e2cd_1006 conda-forge
liblapack 3.8.0 15_mkl conda-forge
libopencv 3.4.2 h20b85fd_0
libpng 1.6.37 hfe6a214_1 conda-forge
libsodium 1.0.17 h2fa13f4_0 conda-forge
libtiff 4.1.0 h885aae3_6 conda-forge
libxml2 2.9.10 h9ce36c8_0 conda-forge
libxslt 1.1.33 heafd4d3_0 conda-forge
lxml 4.4.1 py37heafd4d3_0 conda-forge
lz4-c 1.9.2 h62dcd97_1 conda-forge
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
markdown 3.2.2 pypi_0 pypi
markupsafe 1.1.1 py37h8055547_1 conda-forge
matplotlib 3.1.1 py37_2 conda-forge
matplotlib-base 3.1.1 py37h2981e6d_2 conda-forge
mistune 0.8.4 py37h8055547_1001 conda-forge
mkl 2020.0 166
mkl-service 2.3.0 py37hb782905_0
mkl_fft 1.0.15 py37h14836fe_0
mkl_random 1.1.1 py37h3bbf574_0 conda-forge
msys2-conda-epoch 20160418 1
nbconvert 5.6.1 py37hc8dfbb8_1 conda-forge
nbformat 5.0.6 py_0 conda-forge
notebook 6.0.3 py37hc8dfbb8_0 conda-forge
numpy 1.17.1 py37hc71023c_0 conda-forge
numpy-base 1.17.4 py37hc3f5095_0
olefile 0.46 py_0 conda-forge
opencv 3.4.2 py37h40b0b35_0
openssl 1.1.1g he774522_0 conda-forge
packaging 20.1 py_0 conda-forge
pandas 1.0.3 py37h3bbf574_1 conda-forge
pandoc 2.9.2.1 0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
parso 0.7.0 pyh9f0ad1d_0 conda-forge
pathlib 1.0.1 py37hc8dfbb8_2 conda-forge
pickleshare 0.7.5 py37hc8dfbb8_1001 conda-forge
pillow 6.2.1 py37h5fcff3f_1 conda-forge
pip 20.1 pyh9f0ad1d_0 conda-forge
prometheus_client 0.7.1 py_0 conda-forge
prompt-toolkit 3.0.5 py_0 conda-forge
prompt_toolkit 3.0.5 0 conda-forge
protobuf 3.11.3 pypi_0 pypi
py-opencv 3.4.2 py37hc319ecb_0
pycocotools 2.0 pypi_0 pypi
pygments 2.6.1 py_0 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyqt 5.12.3 py37h1834ac0_3 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtchart 5.12 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
pyrsistent 0.16.0 py37h8055547_0 conda-forge
python 3.7.6 h60c2a47_5_cpython conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.7 1_cp37m conda-forge
pytz 2020.1 pyh9f0ad1d_0 conda-forge
pywin32 227 py37hfa6e2cd_0 conda-forge
pywinpty 0.5.7 py37_0 conda-forge
pyzmq 19.0.1 py37h453f00a_0 conda-forge
qt 5.12.5 h7ef1ec2_0 conda-forge
qtconsole 4.7.3 pyh9f0ad1d_0 conda-forge
qtpy 1.9.0 py_0 conda-forge
send2trash 1.5.0 py_0 conda-forge
setuptools 46.1.3 py37hc8dfbb8_0 conda-forge
six 1.14.0 py_1 conda-forge
sqlite 3.30.1 hfa6e2cd_0 conda-forge
tensorboard 1.14.0 pypi_0 pypi
tensorflow-estimator 1.14.0 pypi_0 pypi
tensorflow-gpu 1.14.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
terminado 0.8.3 py37hc8dfbb8_1 conda-forge
testpath 0.4.4 py_0 conda-forge
tk 8.6.10 hfa6e2cd_0 conda-forge
tornado 6.0.4 py37hfa6e2cd_0 conda-forge
traitlets 4.3.3 py37hc8dfbb8_1 conda-forge
vc 14.1 h869be7e_1 conda-forge
vs2015_runtime 14.16.27012 h30e32a0_2 conda-forge
wcwidth 0.1.9 pyh9f0ad1d_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
werkzeug 1.0.1 pypi_0 pypi
wheel 0.34.2 py_1 conda-forge
widgetsnbextension 3.5.1 py37_0 conda-forge
wincertstore 0.2 py37_1003 conda-forge
winpty 0.4.3 4 conda-forge
wrapt 1.12.1 pypi_0 pypi
xz 5.2.5 h2fa13f4_0 conda-forge
zeromq 4.3.2 h6538335_2 conda-forge
zipp 3.1.0 py_0 conda-forge
zlib 1.2.11 h2fa13f4_1006 conda-forge
zstd 1.4.4 h9f78265_3 conda-forge
`
It worth noting that the documentation does in fact ask for numpy 1.18.
@revrr solution worked for me just do pip install numpy==1.16
Even this is working... pip install update numpy==1.17.4
@EnricoBeltramo Was stuck with the same issue for a long time. I fixed it by downgrading to numpy 1.17.4. This works with tensorflow 1.15.2. Check out https://stackoverflow.com/questions/54099081/how-to-fix-numpy-float64-object-cannot-be-interpreted-as-an-integer.
%tensorflow_version 1.x import tensorflow as tf print(tf.__version__) !pip install numpy==1.17.4
Hope that works for you as well!
works pretty well, thanks!
I am running into the same error. Unfortunately, downgrading numpy to 1.17.4, 1.16, or even older leads to multiple other errors. I am using Tensorflow 2.3.1. Has anybody a solution for TF 2?
I am running into the same error. Unfortunately, downgrading numpy to 1.17.4, 1.16, or even older leads to multiple other errors. I am using Tensorflow 2.3.1. Has anybody a solution for TF 2?
Hi Matt, did you find a solution. I'm experiencing also this problem with tensorflow. Downgrading Numpy gives other problems and upgrading to tensorflow 2.4 is also not possible because of CUDA Version...
br Martin
Hi Matt, did you find a solution. I'm experiencing also this problem with tensorflow. Downgrading Numpy gives other problems and upgrading to tensorflow 2.4 is also not possible because of CUDA Version...
Hi Martin, in my case it helped to uninstall pandas and numpy, then re-install numpy 1.18.5 and pandas 1.1.5. But I'm not sure if this workaround is good for other use cases, too...
Thanks Matt, your answer got me thinking in the right direction. I could solve this by changing the pycocotools version from 2.0.0 to 2.0.1
Thanks Matt, your answer got me thinking in the right direction. I could solve this by changing the pycocotools version from 2.0.0 to 2.0.1
Yes, this also helped me. Used this link for the upgrade to 2.0.2 https://www.programmersought.com/article/90096742523/
@Mayson12381 after the python setup.py build_ext --inplace python setup.py build_ext install
it only appears for the first conda list call
calling conda list again will show pycoco is back to 2.0, same for pip list
For those who doesn't want to or can't modify pycocotool and numpy versions, A quick fix is to go into the "/home/username/.local/lib/python3.6/site-packages/numpy/core/function_base.py", on line 120 and modify into
You can find this file in the error log, just click into the function_base.py and modify it.
@kch3coo life-saver, but is that the right way to handle this issue? I am having this question, since I do not know the way numpy handle this.
For those who doesn't want to or can't modify pycocotool and numpy versions, A quick fix is to go into the "/home/username/.local/lib/python3.6/site-packages/numpy/core/function_base.py", on line 120 and modify into
You can find this file in the error log, just click into the function_base.py and modify it.
That's better than downgrading ✔👌
System information
object_detection
python models/research/object_detection/train.py ...
Describe the problem
I recently updated tensorflow and numpy from pip. During training, I started getting this error:
After the error training fails.
I found a similar-sounding issue: https://github.com/rbgirshick/py-faster-rcnn/issues/625
So perhaps the easy workaround is to cast the float to int before the call, or define the datatype explicitly if it is in a tensor. I wasn't able to find the location where it fails (see log below).
Source code / logs
Find a complete traceback here: https://pastebin.com/97cKf5QT