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

Method AsProtoField

tensorflow/core/framework/tensor.cc:1004–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004void Tensor::AsProtoField(TensorProto* proto) const {
1005 proto->Clear();
1006 shape_.AsProto(proto->mutable_tensor_shape());
1007 proto->set_dtype(dtype());
1008 if (buf_) {
1009 CASES(dtype(), ToProtoField<T>(*buf_, shape_.num_elements(), proto));
1010 }
1011}
1012
1013void Tensor::AsProtoTensorContent(TensorProto* proto) const {
1014 proto->Clear();

Callers 15

RecordRunMethod · 0.80
RecordPRunMethod · 0.80
RecordRunCallableMethod · 0.80
ConvertToProtoFunction · 0.80
TestConvertConstFunction · 0.80
TestCopiesFunction · 0.80
TESTFunction · 0.80
SetAttrValueFunction · 0.80
ToProtoMethod · 0.80
CreateAsProtoFieldFunction · 0.80
UpdateAttrValueMethod · 0.80

Calls 5

dtypeFunction · 0.50
ClearMethod · 0.45
AsProtoMethod · 0.45
set_dtypeMethod · 0.45
num_elementsMethod · 0.45

Tested by 6

TestConvertConstFunction · 0.64
TestCopiesFunction · 0.64
TESTFunction · 0.64
CreateAsProtoFieldFunction · 0.64
GetTensorProtoFunction · 0.64
ValidateMethod · 0.64