Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Update grads.py #40

Merged
merged 1 commit into from Nov 11, 2017
Merged

Update grads.py #40

merged 1 commit into from Nov 11, 2017

Conversation

RikHendriks
Copy link
Contributor

Added the derivatives of the following functions:
np.tan()
np.arccos()
np.arcsin()
np.arctan()

Added tests for the following functions:
np.cos()
np.sin()
np.tan()
np.cosh()
np.sinh()
np.tanh()
np.arccos()
np.arcsin()
np.arctan()

Changed the position of the (cos, sin, tan) functions, such that they are correctly ordered.

np.tan()
np.arccos()
np.arcsin()
np.arctan()

Added tests for the following functions:
np.cos()
np.sin()
np.tan()
np.cosh()
np.sinh()
np.tanh()
np.arccos()
np.arcsin()
np.arctan()

Changed the position of the (cos, sin, tan) functions, such that they are correctly ordered.
@RikHendriks
Copy link
Contributor Author

I see that the test failes on:
module 'astor' has no attribute 'codegen'

This is probably because Astor released a new update two hours ago:
https://github.com/berkerpeksag/astor/releases

@mdanatg
Copy link

mdanatg commented Nov 11, 2017

I believe so, opened #41

@mdanatg
Copy link

mdanatg commented Nov 11, 2017

There is another slight wrinkle: when adding simple functions to functions.py, they will be by default picked up by both reverse and forward tests. This PR defines adjoints, which are useful for reverse mode (gradients), but the forward tests will fail because it can't find tangents which are useful for forward mode (derivatives). Those are defined in tangents.py.

I will pull this change, but we'll need to define the corresponding missing tangents as well. Are you interested in doing it? If not, I can add them.

@mdanatg mdanatg merged commit ff9ffdd into google:master Nov 11, 2017
@RikHendriks
Copy link
Contributor Author

I am interested in doing that, but I don't have time at the moment. So I will be doing that tomorrow.

@bartvm bartvm mentioned this pull request Nov 11, 2017
@RikHendriks RikHendriks mentioned this pull request Nov 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants