Skip to content

Converting Tensor to Numpy array extremely slow in TF 2.0 #27692

@markste-in

Description

@markste-in

Current Issue / Bug Report
I tried to convert a list of tensors to a numpy array.
This was no issue in Tensorflow 1.13.x but is now orders of magnitudes slower in Tensorflow 2.0.0-dev20190405

I linked a piece of code to reproduce the issue in Colab (no HW acceleration required) and to also show the difference in execution time between 1.13.x and 2.0.0/nightly

I tested the issue with
np.array(LIST_OF_TENSORS)
np.shape(LIST_OF_TENSORS)

System information
Colab w.o. HW acceleration and TF 2.0.0-dev20190405

Code to reproduce the issue
Code Example
.

Metadata

Metadata

Labels

TF 2.0Issues relating to TensorFlow 2.0comp:opsOPs related issuestype:bugBug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions