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

Method Compute

tensorflow/contrib/ffmpeg/decode_audio_op.cc:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 }
235
236 void Compute(OpKernelContext* context) override {
237 // Get and verify the input data.
238 OP_REQUIRES(
239 context, context->num_inputs() == 1,
240 errors::InvalidArgument("DecodeAudio requires exactly one input."));
241 const Tensor& contents = context->input(0);
242 OP_REQUIRES(
243 context, TensorShapeUtils::IsScalar(contents.shape()),
244 errors::InvalidArgument("contents must be scalar but got shape ",
245 contents.shape().DebugString()));
246
247 const tensorflow::StringPiece file_contents = contents.scalar<tstring>()();
248 Decode(context, file_contents, file_format_, samples_per_second_,
249 channel_count_, "");
250 }
251
252 private:
253 string file_format_;

Callers

nothing calls this directly

Calls 7

InvalidArgumentFunction · 0.85
DecodeFunction · 0.70
IsScalarFunction · 0.50
num_inputsMethod · 0.45
inputMethod · 0.45
shapeMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected