Python float are always float64. So if you downcast them to float32 there
can be presision loss.

Frédéric

Le dim. 8 oct. 2017 02:22, Adit Bhargav <adit.bhar...@gmail.com> a écrit :

> Hello,
>
> I have a Python float32 variable. I am passing this variable to a GPU OP
> written in  Theano. The variable I am collecting in make_node of theano OP
> is a cudaNDvariable.
> I followed a C file to store my Apply specific code where I am collecting
> this variable as CUDANDArray*
>
> Then I pass it to a kernel to print it's value. Unexpectedly, it takes the
> value upto decimal point as correct value but after decimal it's adding
> some unknown numbers. I dont know from where it's coming from.
>
> For example:
>
> In Python if my value is 537633.0 , in CUDA kernel  I am getting
> as 537633.375000
> Similarly,  716264.0 as 716264.750000
>                 969777.0 as 969777.937500
>                 963690.0 as 963690.875000
> and          602411.0 as  602411.812500
>
> I dont understand how CUDANDvariables in my CUDA kernel gets modified
> after decimal points?
>
> Please let me know if anyone has any idea for this strange behaviour ?
>
> Thanks !!
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to theano-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to theano-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to