Title: Invalid argument: TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. Traceback (most recent call last):
Tags: python;tensorflow;google-colaboratory
Question: I am getting the above error while training the models
I am training it on Google Colab


tensorflow version = 1.15
numpy version = 1.18.0

!python3 object_detection/model_main.py \
--pipeline_config_path=/content/models/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config \
--model_dir=training/


I am totally new to tensorflow and not sure how to solve it. Can anyone please help me

This is error

```Traceback (most recent call last):



 File "/usr/local/lib/python3.6/dist-packages/numpy/core/function_base.py", line 117, in linspace
    num = operator.index(num)

TypeError: 'numpy.float64' object cannot be interpreted as an integer
```

Comment: Post the code where error occurred instead of giving link to notebook

Comment: @Rei Moriaty, Is your issue resolved now? Else, can you share the code to reproduce your issue so that we can help you. Thanks!

Comment: @TensorflowWarriors Yeah the problem has been solved. I changed my numpy version to 1.17.0.


Here is another answer: Providing the solution here (Answer Section), even though it is present in the comments section, for the benefit of the community.

When the user has downgrade ```numpy``` version ```1.18.0``` to ```1.17.0``` has resolved the problem.

```%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)
!pip install numpy==1.17.0
```


Here is another answer: find where the linspace command is used in the code, the ```num``` variable needs to be passed as an integer. Shown in below answer:
```np.linspace(0,1,int(10.))
```
Downgrading may not be required if one finds where linspace is used.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:03/21/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><tensorflow><google-colaboratory>', 'Title': "Invalid argument: TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer. Traceback (most recent call last):", 'ViewCount': 511, 'id': 60786386, 'user_AboutMe': None, 'user_AccountId': 16068130.0, 'user_DisplayName': 'Rei Moriaty', 'user_Reputation': 21.0, 'user_Views': 0.0, 'user_id': 11597225.0}}