Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8819835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:27:44+00:00 2026-06-14T05:27:44+00:00

I have really interesting problem, but I am solving it for 3 hours and

  • 0

I have really interesting problem, but I am solving it for 3 hours and I just can’t figure out what is going on and why it isn’t working. I tried google it, but with no results.

I am coding program on CUDA. I have this really simple piece of code:

__global__ void calcErrorOutputLayer_kernel(*arguments...*)
{

   int idx = blockIdx.x * blockDim.x + threadIdx.x;
   float gradient;
   float derivation;
   derivation = pow((2/(pow(euler, neuron_device[startIndex + idx].outputValue) +
                pow(euler, -neuron_device[startIndex + idx].outputValue))), 2);
   gradient = (backVector_device[idx] - neuron_device[startIndex + idx].outputValue);

   gradient = gradient * derivation;   //this line doesn't work   
   gradient = gradient * 2.0;          //this line works

ok, so gradient is calculated correctly and also derivation. but when comes line, where should be these two variables multiplicated with each other nothing happens (value of gradient isn’t changed) and on next line CUDA debugger tells me that: ” ‘derivation’ has no value at the target location “

gradient * 2.0 works correctly and it change value of gradient 2 times.

Can anyone help me please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:27:45+00:00Added an answer on June 14, 2026 at 5:27 am
    a = pow(euler, neuron_device[startIndex + idx].outputValue);
    b = pow(euler, -neuron_device[startIndex + idx].outputValue);
    derivation = pow((2/(a + b),2);
    

    Pow gives an error when:

    • the base is negative and exponent is not an integral value, or
    • the base is zero and the exponent is negative, a domain error occurs, setting the global variable errno to the value EDOM.

    I guess that you are facing precision problems, and both 'a' and 'b' are 0. You probably are getting derivation = 0 or "inf".

    Can you change floats to doubles?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an interesting problem. I have a working M/R version of this but
I have started playing around with Berkeley DB. This one is really interesting, but
i have a very interesting problem. background i've used TTreeView for years but only
It's an interesting problem, really, for all you Devise masters you there. We have
I have a really interesting case: I have a site where this is already
I have really basic question. How can I get form id by input element
I'm using Filemaker Pro 12 Advanced. I have a few tables but have really
I really have problem with this one. So I have a jar with a
I really have no idea what I did to cause this exception, but I
We have an interesting problem that I was hoping someone could help to shed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.