You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding this issue here because I'm not sure if this is an issue on pyopencl side, on our side or a napari issue.
When replacing fly in this line with background_subtracted_fly, the te_oki.py script crashes. Napari cannot show OCLArrays even though the OCLArray should be accessible as a numpy array. I think we need to introduce a cle.pull method but couldn't figure out how to convert an OCLArray into a numpy array.
If someone has an idea how to fix this, feel freel to push to master :-)
Thanks!
Cheers,
Robert
P.S.: The error message reads like this:
>python te_oki.py
no scikit-tensor detected, so separable functions wont work
This is a python3 issue and can be resolved by:
git clone https://github.com/mnick/scikit-tensor.git
pip3 install scikit-tensor
(121, 1024, 512)
C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\pyopencl\cffi_cl.py:1502: CompilerWarning: Non-empty compiler output encountered. Set the environment variable PYOPENCL_COMPILER_OU
TPUT=1 to see more.
"to see more.", CompilerWarning)
Traceback (most recent call last):
File "te_oki.py", line 21, in <module>
viewer.add_image(background_subtracted_fly);
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\napari\components\add_layers_mixin.py", line 228, in add_image
return self.add_layer(layers.Image(data, **kwargs))
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\napari\layers\image\image.py", line 232, in __init__
self.contrast_limits_range = self._calc_data_range()
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\napari\layers\image\image.py", line 257, in _calc_data_range
return calc_data_range(input_data)
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\napari\layers\utils\layer_utils.py", line 35, in calc_data_range
[np.max(data[idx]) for idx in idxs],
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\napari\layers\utils\layer_utils.py", line 35, in <listcomp>
[np.max(data[idx]) for idx in idxs],
File "<__array_function__ internals>", line 6, in amax
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\numpy\core\fromnumeric.py", line 2668, in amax
keepdims=keepdims, initial=initial, where=where)
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\numpy\core\fromnumeric.py", line 88, in _wrapreduction
return reduction(axis=axis, out=out, **passkwargs)
File "C:\Users\rober\Anaconda3\envs\te_oki\lib\site-packages\gputools\core\ocltypes.py", line 123, in func
return getattr(mod, f)(self, *args, **kwargs)
TypeError: f() got an unexpected keyword argument 'axis'
The text was updated successfully, but these errors were encountered:
And if you don't need it to be automatic, just call oclarray.get(). =)
I also want to note that long term, it would be super awesome if the arrays could just stay on the GPU, since we are then turning them into an OpenGL array. 😂 But, that will take quite a bit of coordination still, so the above remains your best bet.
I also want to note that long term, it would be super awesome if the arrays could just stay on the GPU, since we are then turning them into an OpenGL array.
Let's see who is faster: You implementing that or us streaming OpenCL-Buffers directly into Tensorflow. It's always good to keep a long-term goal for later - long term ;-)
Hey Folks,
I'm adding this issue here because I'm not sure if this is an issue on pyopencl side, on our side or a napari issue.
When replacing
fly
in this line withbackground_subtracted_fly
, the te_oki.py script crashes. Napari cannot show OCLArrays even though the OCLArray should be accessible as a numpy array. I think we need to introduce a cle.pull method but couldn't figure out how to convert an OCLArray into a numpy array.If someone has an idea how to fix this, feel freel to push to master :-)
Thanks!
Cheers,
Robert
P.S.: The error message reads like this:
The text was updated successfully, but these errors were encountered: