ONE - On-device Neural Engine
Loading...
Searching...
No Matches
caffe2_proto_helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef MIR_CAFFE2_PROTO_HELPER_H
18#define MIR_CAFFE2_PROTO_HELPER_H
19
20#include "caffe2/proto/caffe2.pb.h"
21
22namespace mir_caffe2
23{
24
25using RepArgument = const ::google::protobuf::RepeatedPtrField<::caffe2::Argument> &;
26
27const ::caffe2::Argument &findArgumentByName(RepArgument args, const std::string &name);
28
29bool hasArgument(RepArgument args, const std::string &name);
30
31int getSingleArgument(const ::caffe2::OperatorDef &op, const std::string &argument_name,
32 int default_value);
33float getSingleArgument(const ::caffe2::OperatorDef &op, const std::string &argument_name,
34 float default_value);
35std::string getSingleArgument(const ::caffe2::OperatorDef &op, const std::string &argument_name,
36 const std::string &default_value);
37
38} // namespace mir_caffe2
39
40#endif // MIR_CAFFE2_PROTO_HELPER_H
const ::caffe2::Argument & findArgumentByName(RepArgument args, const std::string &name)
int getSingleArgument(const ::caffe2::OperatorDef &op, const std::string &argument_name, const int default_value)
bool hasArgument(RepArgument args, const std::string &name)
const ::google::protobuf::RepeatedPtrField<::caffe2::Argument > & RepArgument