MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / StoreDatasetInVariantTensor

Function StoreDatasetInVariantTensor

tensorflow/core/framework/dataset.cc:359–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359Status StoreDatasetInVariantTensor(DatasetBase* dataset, Tensor* tensor) {
360 if (!(tensor->dtype() == DT_VARIANT &&
361 TensorShapeUtils::IsScalar(tensor->shape()))) {
362 return errors::InvalidArgument(
363 "Dataset tensor must be a scalar of dtype DT_VARIANT.");
364 }
365 tensor->scalar<Variant>()() = DatasetVariantWrapper(dataset);
366 return Status::OK();
367}
368
369Status DatasetBase::DatasetGraphDefBuilder::AddInputDataset(
370 SerializationContext* ctx, const DatasetBase* dataset, Node** output) {

Callers 15

AddInputDatasetMethod · 0.85
ComputeMethod · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85
TEST_FFunction · 0.85

Calls 5

InvalidArgumentFunction · 0.85
IsScalarFunction · 0.50
dtypeMethod · 0.45
shapeMethod · 0.45

Tested by 15

TEST_PFunction · 0.68
TEST_FFunction · 0.68
TEST_PFunction · 0.68
TEST_FFunction · 0.68
TEST_PFunction · 0.68
TEST_FFunction · 0.68
TEST_PFunction · 0.68
TEST_FFunction · 0.68