Skip to content

Update mlp.py - #5

Closed
Seyyidosman wants to merge 1 commit into
musikalkemist:masterfrom
Seyyidosman:master
Closed

Seyyidosman wants to merge 1 commit into
musikalkemist:masterfrom
Seyyidosman:master

Conversation

@Seyyidosman

Copy link
Copy Markdown

In the _sigmoid_derivative methode. There was a x * (1 - x) but the derivative of sigmoid function should be sigmoid(x) * (1- sigmoid(x))

In the _sigmoid_derivative methode. There was a x * (1 - x)  but the derivative of sigmoid function should be sigmoid(x) * (1- sigmoid(x))
@MLsound

MLsound commented Jan 4, 2026

Copy link
Copy Markdown
Collaborator

Hi @Seyyidosman, thank you very much for your interest in the repository and for looking so closely at the mathematical implementation! I sincerely appreciate your patience during this time.

After reviewing the code, I have decided to decline this PR to maintain the current implementation. The proposed change is not really necessary, as the current code uses a standard optimization where the derivative is calculated using the already-computed activations.

Valerio explains this specific implementation detail in the course video here.

I really appreciate the curiosity and the time you took to verify the formulas—it’s exactly the kind of attention to detail we love to see in the TSOAI community! I'll be closing this PR to keep the code aligned with the logic taught in the videos.

@MLsound MLsound closed this Jan 4, 2026
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.

2 participants