Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented std_grad in backward.mojo #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ManishAradwad
Copy link

@ManishAradwad ManishAradwad commented Nov 6, 2023

@TilliFe @andresnowak please verify the implementation #9

@andresnowak
Copy link
Contributor

andresnowak commented Nov 6, 2023

From what i understand, the only thing that is incorrect is this a.grad.simd_load[_nelts](idx_a) * std_derivativeinstead of a multiplication it should be a sum, we have to accumulate the gradient in the a Tensor and doing the chain rule in this operation std_derivative * b.grad.load(idx_b)

@TilliFe
Copy link
Owner

TilliFe commented Nov 7, 2023

Thanks @ManishAradwad :). I will merge this as soon as I am back. Leave this PR open.

@ManishAradwad
Copy link
Author

From what i understand, the only thing that is incorrect is this a.grad.simd_load[_nelts](idx_a) * std_derivativeinstead of a multiplication it should be a sum, we have to accumulate the gradient in the a Tensor and doing the chain rule in this operation std_derivative * b.grad.load(idx_b)

Right! I'll correct it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants