MCPcopy Create free account
hub / github.com/NVIDIA/DALI / CheckValidOutputShape

Function CheckValidOutputShape

dali/kernels/slice/slice_kernel_utils.h:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template <int Dims, typename Args>
48void CheckValidOutputShape(const TensorShape<Dims> &in_sample_shape,
49 const TensorShape<Dims> &out_sample_shape,
50 const Args &args) {
51 for (int d = 0; d < Dims; d++) {
52 DALI_ENFORCE(args.shape[d] <= out_sample_shape[d],
53 "Output shape dimension " + std::to_string(d) + " is too small");
54 }
55}
56
57template <int Dims, typename Args>
58TensorShape<Dims> GetOutputShape(const TensorShape<Dims> &in_sample_shape, const Args &args) {

Callers 2

SetupMethod · 0.85
SetupMethod · 0.85

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected