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

Function CreatePReLU

tensorflow/lite/delegates/gpu/cl/kernels/prelu.cc:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83Status CreatePReLU(const CreationContext& creation_context,
84 const OperationDef& definition, const PReLUAttributes& attr,
85 PReLU* result) {
86 auto alpha = absl::get_if<::tflite::gpu::Tensor<Linear, DataType::FLOAT32>>(
87 &attr.alpha);
88 if (!alpha) {
89 return InvalidArgumentError("Alpha is missing");
90 }
91 *result = PReLU(definition, attr);
92 RETURN_IF_ERROR(result->UploadParameters(*alpha, creation_context.context));
93 result->SetLinkIndex(0);
94 return OkStatus();
95}
96
97} // namespace cl
98} // namespace gpu

Callers 2

SelectPReLUFunction · 0.85
TEST_FFunction · 0.85

Calls 5

OkStatusFunction · 0.85
UploadParametersMethod · 0.80
PReLUClass · 0.70
InvalidArgumentErrorFunction · 0.50
SetLinkIndexMethod · 0.45

Tested by 1

TEST_FFunction · 0.68