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

Improve documentation of ExternalSource and RandomResizedCrop #815

Merged
merged 1 commit into from Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion dali/pipeline/operators/resize/random_resized_crop.cc
Expand Up @@ -24,7 +24,8 @@ namespace dali {

DALI_SCHEMA(RandomResizedCrop)
.DocStr("Perform a crop with randomly chosen area and aspect ratio,"
" then resize it to given size.")
" then resize it to given size. Expects a 3-dimensional input with samples"
" in HWC layout (height, width, channels)")
.NumInput(1)
.NumOutput(1)
.AllowMultipleInputSets()
Expand Down
6 changes: 4 additions & 2 deletions dali/pipeline/operators/util/external_source.cc
Expand Up @@ -45,8 +45,10 @@ DALI_REGISTER_OPERATOR(ExternalSource, ExternalSource<CPUBackend>, CPU);
DALI_SCHEMA(ExternalSource)
.DocStr(R"code(Allows externally provided data to be passed as an input to the pipeline,
see :meth:`nvidia.dali.pipeline.Pipeline.feed_input` and
:meth:`nvidia.dali.pipeline.Pipeline.iter_setup`. Currenlty this operator is not
supported in TensorFlow.)code")
:meth:`nvidia.dali.pipeline.Pipeline.iter_setup`. Currently this operator is not
supported in TensorFlow. It is worth noting that fed inputs should match the number of dimensions
expected by the next operator in the pipeline (e.g. NHWC will expect 3-dimensional tensors
where the last dimension represents the different channels).)code")
.NumInput(0)
.NumOutput(1);

Expand Down
3 changes: 2 additions & 1 deletion dali/python/nvidia/dali/pipeline.py
Expand Up @@ -232,7 +232,8 @@ def build(self):

def feed_input(self, ref, data):
"""Bind the NumPy array to a tensor produced by ExternalSource
operator."""
operator. It is worth mentioning that `ref` should not be overriden
with other operator outputs."""
if not self._built:
raise RuntimeError("Pipeline must be built first.")
if not isinstance(ref, Edge.EdgeReference):
Expand Down