Commit 3a0489e
Metrics Phase 1 (#180)
* Initial checkin
* Initial checkin and sync with master
* Initial checkin and sync with master
* JavaDoc cleanup
* Javadoc fixes
* Change LossInterface to LossMetric.
Fix JavaDoc,
modify one line code block to include braces.
* Removed hashmap for variables, they are not needed as the variables only live within a single instance of a Metric.
* reformat code
* Add tests for assertBroadcastable
* Change type to resultType
* Added V data type for sampleWeights so that it is not forced to be the same type as the return or internal variables,
* change 'type' to 'resultType'
* clean up mean and fix assert assertBroadcastable
* fix error message
* Change sampleWeights to have its own generic type <S extends TNumber>
* Add commment about invalid tests expecting IllegalArgumentExceptions
* Add this exception instead of the more generic IllegalArgumentException when static shapes cannot boradcast.
* change IllegalArgumentException to NotBroadcastableException.
change hasValidNonscalarShape to canBroadcastNonscalarShapes
change hasValidNonscalarShape to canBroadcastNonscalarShapes
* reformat code
* Fis=x Javadoc
move the dynamic shapes and rank down to the dynamic section so they are created needlessly when static
Fix if statement to check for unknown size and unknown dimensions
* Fix Reduce to use boradcastWeights,
renamed WeightBroadcastTest to AssertBroadcastableTest and added BroadcastWeightsTest
* Added comment to count to indicate that it may be weighted.
* Added SetsOps and fixed AssertBroadcastable to use SetsOps methods,
* Fixed based on various PR comments.
* Deleted, no longer needed after change to Variable handling in Metrics.
* Nicer error messages for mode-forbidden ops (#169)
* start fobbiden ops checks
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* fix style
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* move checks to builder method
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Initialization imprvements (#178)
* No-op on initAdd in eager mode
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* runInit() method in session
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* add doInitialization() to Runner
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* fix javadoc
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* assume only graph or eager environments
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Remove doInit(), update javadocs
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* small fixes
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Clairify tensorOf lifetime requirements (#190)
* Clairify tensorOf lifetime requirements
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Do codegen
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Remove extra generics from op generation (#193)
* Successfully remove extra type params, but it broke javadoc generation
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Generate covariant types
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Do generation
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Update help text.
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Fixes
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Add Java 11 support - Initial Phase (#185)
* Add profile for JDK11 and Automatic-Module-Name to jars
* add maven.compiler.release=11
* Update manual ops for new codegen (#196)
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
* Fix Losses to use CHANNELS_FIRST/LAST for CategoricalCrossentropy
* Fix SetOps to properly convert sparse tensor to dense tensor using tf.sparse.sparseToDense with the output of tf.sparse.denseToDenseSetOperation
* Initial checkin
* Initial checkin and sync with master
* Initial checkin and sync with master
* JavaDoc cleanup
* Javadoc fixes
* Change LossInterface to LossMetric.
Fix JavaDoc,
modify one line code block to include braces.
* Removed hashmap for variables, they are not needed as the variables only live within a single instance of a Metric.
* reformat code
* Add tests for assertBroadcastable
* Change type to resultType
* Added V data type for sampleWeights so that it is not forced to be the same type as the return or internal variables,
* change 'type' to 'resultType'
* clean up mean and fix assert assertBroadcastable
* fix error message
* Change sampleWeights to have its own generic type <S extends TNumber>
* Add commment about invalid tests expecting IllegalArgumentExceptions
* Add this exception instead of the more generic IllegalArgumentException when static shapes cannot boradcast.
* change IllegalArgumentException to NotBroadcastableException.
change hasValidNonscalarShape to canBroadcastNonscalarShapes
change hasValidNonscalarShape to canBroadcastNonscalarShapes
* reformat code
* Fis=x Javadoc
move the dynamic shapes and rank down to the dynamic section so they are created needlessly when static
Fix if statement to check for unknown size and unknown dimensions
* Fix Reduce to use boradcastWeights,
renamed WeightBroadcastTest to AssertBroadcastableTest and added BroadcastWeightsTest
* Added comment to count to indicate that it may be weighted.
* Added SetsOps and fixed AssertBroadcastable to use SetsOps methods,
* Fixed based on various PR comments.
* Deleted, no longer needed after change to Variable handling in Metrics.
* Fix Losses to use CHANNELS_FIRST/LAST for CategoricalCrossentropy
* Fix SetOps to properly convert sparse tensor to dense tensor using tf.sparse.sparseToDense with the output of tf.sparse.denseToDenseSetOperation
Co-authored-by: Ryan Nett <rnett@calpoly.edu>1 parent 496191d commit 3a0489e
File tree
45 files changed
+4497
-18
lines changed- tensorflow-framework/src
- main/java/org/tensorflow/framework
- losses
- metrics
- exceptions
- impl
- test/java/org/tensorflow/framework
- metrics
- impl
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+4497
-18
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
242 | | - | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| |||
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
Lines changed: 105 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
Lines changed: 83 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
0 commit comments