I'm using CuPy to generate some ground truth + network input data on the GPU, which I want to send to a TensorFlow network through the standard API:
feed_dict = {
network.Labels: labels,
network.Network_Input: networkInput
}
However, TensorFlow 1.15 expects NumPy and not CuPy and I get this error:
File "/lib/python3.6/site-packages/numpy/core/numeric.py", line 538, in asarray return array(a, dtype, copy=False, order=order)
ValueError: object __array__ method not producing an array
Trying to convert the CuPy arrays to NumPy arrays using
labels = numpy.array(labels, dtype=np.float)
I get the error:
ValueError: object __array__ method not producing an array
Is there a way to pass CuPy data to tensorflow ?