-
Notifications
You must be signed in to change notification settings - Fork 949
Conversation
This is a great CL! Nice work with the math CPU / GPU testing, this is so much better. All minor comments below, but I stamped it! Reviewed 9 of 9 files at r1. package.json, line 16 at r1 (raw file):
use a tilde for consistency? src/math/math.ts, line 1612 at r1 (raw file):
why not just put the default here? onValue = 1, offValue = 0 src/math/math_cpu.ts, line 1022 at r1 (raw file):
you need to fill this with offValue src/math/math_cpu.ts, line 1025 at r1 (raw file):
s/1/onValue src/math/multinomial_test.ts, line 33 at r1 (raw file):
Here, and in the other file, can you add an afterAll and dispose the math so we don't create too many webgl rendering contexts? This will be copy pasted all over the place so best to do it right now. src/math/onehot_test.ts, line 63 at r1 (raw file):
add unit tests for non-0 and 1 on/off values src/math/webgl/multinomial_gpu.ts, line 37 at r1 (raw file):
can you move this out to shader_compiler just like you did for round? Comments from Reviewable |
Review status: 2 of 9 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. package.json, line 16 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
nice catch. done src/math/math.ts, line 1612 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
ah, you're right. didn't occur to me for some reason. done src/math/math_cpu.ts, line 1022 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
nice catch. done src/math/math_cpu.ts, line 1025 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
ups. rushed this. done. will add tests. src/math/multinomial_test.ts, line 33 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
nice. src/math/onehot_test.ts, line 63 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Done. src/math/webgl/multinomial_gpu.ts, line 37 at r1 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Done. Comments from Reviewable |
* add multinomial * add cpu implementation and tests * add onehot operation * resolve comments
This change is