Skip to content

Commit

Permalink
Update TF dataset to 2.8 (NVIDIA#3442)
Browse files Browse the repository at this point in the history
* Update TF dataset to 2.8

Signed-off-by: Albert Wolant <[email protected]>
  • Loading branch information
awolant authored Oct 25, 2021
1 parent 9150676 commit 64b79a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dali_tf_plugin/dali_dataset_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,20 @@ class DALIDatasetOp::Dataset : public DatasetBase {
return "DALI::DatasetOp()::Dataset";
}

#if TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION >= 8

tensorflow::int64 CardinalityInternal() const override {
return data::kInfiniteCardinality;
}

#else

tensorflow::int64 Cardinality() const override {
return data::kInfiniteCardinality;
}

#endif

protected:
PipelineDef pipeline_def_;
std::vector<PartialTensorShape> shapes_;
Expand Down

0 comments on commit 64b79a6

Please sign in to comment.