Documenting string and bool tensor types + validate bool blob#842
Conversation
…disAI into string_tensor_support
…ion for bool tensor blob (+ test it)
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
==========================================
+ Coverage 79.97% 81.25% +1.27%
==========================================
Files 53 55 +2
Lines 8009 8145 +136
==========================================
+ Hits 6405 6618 +213
+ Misses 1604 1527 -77
Continue to review full report at Codecov.
|
| ``` | ||
|
|
||
| ###String Tensors | ||
| String tensors are tensors in which every element is a single C-string in utf-8 format. A string element can be at any length, and it cannot contain a null-character (unless it is the last character of the string). |
There was a problem hiding this comment.
| String tensors are tensors in which every element is a single C-string in utf-8 format. A string element can be at any length, and it cannot contain a null-character (unless it is the last character of the string). | |
| String tensors are tensors in which every element is a single C-string in utf-8 format. A string element can be at any length, and it cannot contain a null-character (unless it is a null-terminated string). |
|
|
||
| ###String Tensors | ||
| String tensors are tensors in which every element is a single C-string in utf-8 format. A string element can be at any length, and it cannot contain a null-character (unless it is the last character of the string). | ||
| In blob format, string elements are encoded and concatenated, so that the size of string tensor blob is not determined given the tensor's shapes (unlike in the rest of tensor types) |
There was a problem hiding this comment.
encoded?
please explain what is the dlimiter.
if the size of a string tensor is not determined given the tensor's shapes, please explain how it is determined
DvirDukhan
left a comment
There was a problem hiding this comment.
@alonre24 I made a quick browse over the TENSORGET part. please modify this one also
Added documentation + examples for the new tensor types recently added - BOOL and STRING.
Also, added a verification that bool tensor blob contains only valid values (that is 0 or 1), even though every element's size is one byte.
This PR waits for merging string tensor PR #832, that will be merged soon (after CI is fixed)