Skip to content

Commit ecf8432

Browse files
authored
Fix MakeContiguous sample_dim for empty batches. (#5567)
Use TensorLists's sample_dim instead of the one from (potentially nonexistent) sample 0. Signed-off-by: Michał Zientkiewicz <[email protected]>
1 parent 127015f commit ecf8432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dali/pipeline/operator/builtin/make_contiguous.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace dali {
2121

2222
void MakeContiguousMixed::RunImpl(Workspace &ws) {
2323
const auto& input = ws.Input<CPUBackend>(0);
24-
int sample_dim = input[0].shape().sample_dim();
24+
int sample_dim = input.shape().sample_dim();
2525
size_t batch_size = input.num_samples();
2626
DALIDataType type = input.type();
2727
size_t type_size = input.type_info().size();

0 commit comments

Comments
 (0)