Introduce OutputDoc#1828
Conversation
|
!build |
|
CI MESSAGE: [1197587]: BUILD STARTED |
There was a problem hiding this comment.
| .OutputDoc(1, "sampling_rage", "TensorList of float", "Batch of sampling rates [Hz]") | |
| .OutputDoc(1, "sampling_rate", "TensorList of float", "The sampling rates corresponding to the decoded sound recordings [Hz]") |
There was a problem hiding this comment.
| .OutputDoc(0, "decoded", "TensorList of int16, int32 or float", "Batch of decoded data") | |
| .OutputDoc(0, "decoded", "TensorList of int16, int32 or float", "The decoded audio recordings") |
There was a problem hiding this comment.
| .OutputDoc(0, "start", "TensorList of int", "Begin indices of nonsilent regions") | |
| .OutputDoc(0, "start", "TensorList of int", "Start positions, in samples, of nonsilent regions") |
There was a problem hiding this comment.
| .OutputDoc(1, "length", "TensorList of int", "Lengths of nonsilent regions") | |
| .OutputDoc(1, "length", "TensorList of int", "Lengths, in samples, of nonsilent regions") |
There was a problem hiding this comment.
| .OutputDoc(0, "images", "1D TensorList of uint8", "Undecoded image data") | |
| .OutputDoc(0, "data", "1D TensorList of uint8", "Raw file contents") |
This reader can also be used for audio or whatever else...
There was a problem hiding this comment.
Right. Probably same with others.
There was a problem hiding this comment.
| .OutputDoc(0, "images", "1D TensorList of uint8", "Undecoded image data") | |
| .OutputDoc(0, "data", "1D TensorList of uint8", "Raw data buffers") |
There was a problem hiding this comment.
Yeah, I will remove it, I'm still working on some parts and wanted to render the docs for everyone to see.
There was a problem hiding this comment.
This monster should go back to the fiery chasm from whence it came ;)
|
CI MESSAGE: [1197587]: BUILD PASSED |
There was a problem hiding this comment.
| "Output dox cannot be used when the AdditionalOutputFn was set"); | |
| "Output doc cannot be used when the AdditionalOutputFn was set"); |
There was a problem hiding this comment.
this will change as soon as I merge my BBox PR. I am no longer using the ltrb terminology, and now you can have an arbitrary order of the coordinates
There was a problem hiding this comment.
I will wait for your PR, and replace those docs, it's basically placeholder taken from the docstring (as is in other places...).
There was a problem hiding this comment.
about to change as we'll support 3d as well (same below)
There was a problem hiding this comment.
Took changes from your PR.
There was a problem hiding this comment.
| .InputDoc(0, "BBoxes", "TensorList of floats", | |
| .InputDoc(0, "bboxes", "TensorList of floats", |
Either all lowercase or all capitalized
There was a problem hiding this comment.
I think it's {batch_size, m}
There was a problem hiding this comment.
Nope,
void RandomBBoxCrop<CPUBackend>::WriteLabelsToOutput(
SampleWorkspace &ws, const std::vector<int> &labels) const {
auto &labels_out = ws.Output<CPUBackend>(3);
labels_out.Resize({static_cast<Index>(labels.size()), 1});
There was a problem hiding this comment.
But it still more like batch * {m_i, 1}, where m_i is different for every sample i
There was a problem hiding this comment.
4 will change. Also, it's not clear what m stands for
There was a problem hiding this comment.
I tried to rephrase it better. m was taken from the current description that was just using it. I'm also not sure what it stands for :P
There was a problem hiding this comment.
| "If provided, the output is given the same shape as `data` and the contents are ignored") | |
| "If provided, the output is given the same shape as `data` (data contents are ignored)") |
There was a problem hiding this comment.
| undecoded image data, only if image_available = true | |
| encoded image data, only if image_available = true |
There was a problem hiding this comment.
I'd write "optical flow" instead of OF
There was a problem hiding this comment.
the rest of the doc already use OF extensively.
There was a problem hiding this comment.
Ok then, but I don't like using "OF" as if it was a well-established acronym
There was a problem hiding this comment.
same comments as before
There was a problem hiding this comment.
| std::string name = {}; | |
| std::string name; |
isn't it the same?
There was a problem hiding this comment.
| std::vector<InOutDoc> input_dox_ = {}; | |
| std::vector<InOutDoc> input_dox_; |
?
|
!build |
|
Waits for #1785 to stabilize the docs. |
|
CI MESSAGE: [1202805]: BUILD STARTED |
|
CI MESSAGE: [1202805]: BUILD PASSED |
…eturns Introduce OutputDoc and OutputDocStr as a mechanism for creating Returns section for Operator __call__, similar to InputDoc & InputDocString that were already present. Allow for unnamed outputs Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
|
!build |
|
CI MESSAGE: [1214698]: BUILD STARTED |
|
CI MESSAGE: [1214698]: BUILD PASSED |
| )code") | ||
| .NumInput(1) | ||
| .NumOutput(2) | ||
| .OutputDoc(0, "decoded", "TensorList of int16, int32 or float", "The decoded audio recordings.") |
There was a problem hiding this comment.
I think I remember the conclusion was to start using TensorList for describing outputs. Wasn't it?
| ``{m_i ,4}`` Tensor (``m_i * [x, y, w, h]`` or ``m_i * [left, top, right, bottom]``) | ||
| and labels as ``{m_i, 1}`` Tensor (``m * category_id``).)code") | ||
| .OutputDocStr(R"code(images : 1D TensorList of uint8 | ||
| Encoded image data.s. |
|
Continued in #1908 |
Why we need this PR?
We want better docs
What happened in this PR?
[
Introduce OutputDoc and OutputDocStr as a mechanism for creating
Returnssection for Operator__call__, similar to InputDoc & InputDocString that were already present.Fill it for most operators with non-trivial returns.
]
[
OpSchema, ops.py - docstring generator, docs of some Ops
]
[
Please suggest how to better document shapes and operators with variable number of outputs.
]
[ Needs some proofreading mostly and looking through generated docs ]
[ Most certainly ]
JIRA TASK: [Use DALI-XXXX or NA]