ajaichemmanam / simple_bodypix_python

A simple and minimal bodypix inference in python
76 stars 19 forks source link

Cannot convert a symbolic Tensor (Cast:0) to a numpy array. #8

Closed Fafa87 closed 4 years ago

Fafa87 commented 4 years ago

When I try to run the code I get:


  File "simple_bodypix_python/evalbody_singleposemodel.py", line 179, in <module>
    segmentationMask, (segmentationMask.shape[0], segmentationMask.shape[1]))
  File "<__array_function__ internals>", line 6, in reshape
  File "lib\site-packages\numpy\core\fromnumeric.py", line 301, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
  File "lib\site-packages\numpy\core\fromnumeric.py", line 47, in _wrapit
    result = getattr(asarray(obj), method)(*args, **kwds)
  File "lib\site-packages\numpy\core\_asarray.py", line 85, in asarray
    return array(a, dtype, copy=False, order=order)
  File "lib\site-packages\tensorflow_core\python\framework\ops.py", line 736, in __array__
    " array.".format(self.name))
NotImplementedError: Cannot convert a symbolic Tensor (Cast:0) to a numpy array.```
ajaichemmanam commented 4 years ago

See issue #5

Fafa87 commented 4 years ago

Great! Thanks!

Fafa87 commented 4 years ago

Perhaps put it somewhere in readme or in code. I did not think to look through closed issues.