Skip to content

Implement GradFn_crossentropy and fix GradFn_softmax #8

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Numbers0689
Copy link

@Numbers0689 Numbers0689 commented Mar 6, 2025

Gradient Functions:

  • Implement GradFn_crossentropy for proper backpropagation, without GradFn_crossentropy the loss Tensor is disconnected from the rest of the computational graph.
  • Fix GradFn_softmax to index correctly and store only the vector jacobian product. The existing function crashes the program as it tries to access out of range index, once the computational graph is connected (mentioned above) and the backward pass reaches this function.

Fix GradFn_softmax to index correctly and store only the vector jacobian
product. Implement GradFn_crossentropy for proper backpropagation.
@Numbers0689 Numbers0689 marked this pull request as ready for review March 6, 2025 15:31
@Numbers0689 Numbers0689 changed the title Implement GradFn_crossentropy and fix GradFn_softmax Implement GradFn_crossentropy and fix GradFn_softmax, cten_elementwise_broadcast Mar 6, 2025
@Numbers0689 Numbers0689 force-pushed the fix-ctensor-prototype branch from 94d453a to 7616863 Compare March 7, 2025 23:36
@Numbers0689 Numbers0689 changed the title Implement GradFn_crossentropy and fix GradFn_softmax, cten_elementwise_broadcast Implement GradFn_crossentropy and fix GradFn_softmax Mar 7, 2025
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.

1 participant