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

Function MfccShapeFn

tensorflow/core/ops/audio_ops.cc:103–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103Status MfccShapeFn(InferenceContext* c) {
104 ShapeHandle spectrogram;
105 TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 3, &spectrogram));
106 ShapeHandle unused;
107 TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused));
108
109 int32 dct_coefficient_count;
110 TF_RETURN_IF_ERROR(
111 c->GetAttr("dct_coefficient_count", &dct_coefficient_count));
112
113 DimensionHandle spectrogram_channels = c->Dim(spectrogram, 0);
114 DimensionHandle spectrogram_length = c->Dim(spectrogram, 1);
115
116 DimensionHandle output_channels = c->MakeDim(dct_coefficient_count);
117
118 c->set_output(0, c->MakeShape({spectrogram_channels, spectrogram_length,
119 output_channels}));
120 return Status::OK();
121}
122
123} // namespace
124

Callers

nothing calls this directly

Calls 7

WithRankMethod · 0.45
inputMethod · 0.45
GetAttrMethod · 0.45
DimMethod · 0.45
MakeDimMethod · 0.45
set_outputMethod · 0.45
MakeShapeMethod · 0.45

Tested by

no test coverage detected