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

Method Decode

tensorflow/core/kernels/data/optional_ops.h:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 bool Decode(const VariantTensorData& data) {
75 if (data.type_name() != TypeName()) {
76 return false;
77 }
78 bool has_value = false;
79 if (!data.get_metadata(&has_value)) {
80 return false;
81 }
82 if (has_value) {
83 values_ = std::make_shared<std::vector<Tensor>>(data.tensors());
84 } else {
85 values_.reset();
86 }
87 return true;
88 }
89
90 string DebugString() const {
91 if (values_) {

Callers

nothing calls this directly

Calls 5

TypeNameFunction · 0.85
get_metadataMethod · 0.80
tensorsMethod · 0.80
type_nameMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected