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

Make a function that recieves an N-D vector and returns its pseudo-random gradient. #3

Open
3 of 4 tasks
felix91gr opened this issue Jun 24, 2018 · 4 comments
Open
3 of 4 tasks
Assignees
Labels
Step Issue describing a step in a project

Comments

@felix91gr
Copy link
Owner

felix91gr commented Jun 24, 2018

  • Input: N-D vector
  • Output: N-D unitary, pseudorandom vector

To-Do:

  • Implement function
  • Add test for length (n) and size (unitary) of output vector
  • Add test for expected value of output vector (0n)
  • Add tests to check that the output is deterministic.
@felix91gr felix91gr self-assigned this Jun 24, 2018
@felix91gr
Copy link
Owner Author

This is implemented. I must now add some sanity tests to check that it gives:

  • Unitary N-D vectors (API contract)
  • An expected value of 0N (no directional bias)

felix91gr added a commit that referenced this issue Jun 25, 2018
Added two of the 3 tests required by issue #3
@felix91gr felix91gr added the Step Issue describing a step in a project label Jun 26, 2018
@felix91gr
Copy link
Owner Author

All tests have been added.

All I have left to do for this issue is to make the "Unitary Gradients" test more precise. Currently I'm comparing the length of the vectors to 0 with a fixed tolerance of 0.01. This is to cover for floating-point precision errors. But there are better ways. I want to be using ulp (units of least precision), which are the standard for covering up for floating point precision errors. After adding that to that test, this issue should be more or less complete.

@felix91gr
Copy link
Owner Author

Update on this:

  • I have a version of the unitary-gradients-test that uses native float comparison tools ✅
  • The statistical test had a typo and after fixing it, it fails. That's because I modelled it wrongly. I have a draft of what it should do instead, and after applying that it should be a really good test.
  • I realized there's one more property left to test, and it's the fact that the gradients are deterministic. If you call f(x) twice, the output should be the same. I have to test this holds for (a) single threaded programs and (b) multithreaded ones.

After I finish this semester I will complete this issue once and for all :3

@felix91gr
Copy link
Owner Author

The statistical test has proved harder than I can provide atm. I'm gonna disable it for now, and upload the other tests as they are. I'll solve it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Step Issue describing a step in a project
Projects
None yet
Development

No branches or pull requests

1 participant