I have a feed-forward neural network with a customized cost function. Since my cost function has an exponential component, I need to handle very large numbers. By default, tensorflow uses float32 datatype, which is not sufficient for my work. How can I have a tensorflow model with float64 datatype? I have tried to define all the tensors as float64 and hope the casting take care of the rest but it does not work. Also, I have enabled the eager execution mode.

  • $\begingroup$ Are you using a GPU? I believe only the top-end (expensive) Nvidia GPUs will support... The V100 I believe could do it. Maybe read their website to check what's possible with your hardware. $\endgroup$ – n1k31t4 Apr 29 '19 at 13:25
  • $\begingroup$ No, I am just using CPU but my model is not very big. Isn't it a matter of memory consumption? $\endgroup$ – Rasoul Apr 29 '19 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.