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

Function CalculateOutputSize

tensorflow/core/grappler/costs/utils.cc:229–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229int64 CalculateOutputSize(
230 const std::vector<OpInfo::TensorProperties>& output_properties,
231 const int port_num) {
232 if (port_num < 0) return 4; // 4B for control dependency.
233
234 if (port_num >= output_properties.size()) {
235 LOG(ERROR) << "CalculateOutputSize() -- port_num: " << port_num
236 << " >= output_properties.size(): " << output_properties.size();
237 return 0;
238 }
239
240 return CalculateTensorSize(output_properties[port_num]);
241}
242
243DeviceProperties GetDeviceInfo(const string& device_str) {
244 DeviceProperties unknown;

Callers 15

PredictIdentityMethod · 0.85
PredictVariableMethod · 0.85
PredictMetadataMethod · 0.85
PredictGatherOrSliceMethod · 0.85
PredictMaxPoolMethod · 0.85
PredictAvgPoolMethod · 0.85
PredictAvgPoolGradMethod · 0.85
TESTFunction · 0.85
MarkCurrNodeExecutedMethod · 0.85
SummaryMethod · 0.85

Calls 2

CalculateTensorSizeFunction · 0.85
sizeMethod · 0.45

Tested by 2

TESTFunction · 0.68
TEST_FFunction · 0.68