#include <utility>
#include <vector>
-namespace nnc
+namespace mir_caffe2
{
using namespace ::caffe2;
{"GivenTensorInt64Fill", SupportedCaffe2OpType::givenTensorInt64Fill},
};
-} // namespace nnc
+} // namespace mir_caffe2
* limitations under the License.
*/
-#ifndef NNCC_CAFFE2_IMPORTER_H
-#define NNCC_CAFFE2_IMPORTER_H
+#ifndef MIR_CAFFE2_IMPORTER_H
+#define MIR_CAFFE2_IMPORTER_H
#include <set>
#include <string>
#include "caffe2_op_creator.h"
#include "caffe2_op_types.h"
-namespace nnc
+namespace mir_caffe2
{
class Caffe2Importer
void setGraphOutputs();
};
-} // namespace nnc
+} // namespace mir_caffe2
-#endif // NNCC_CAFFE2_IMPORTER_H
+#endif // MIR_CAFFE2_IMPORTER_H
#include <cmath>
#include <vector>
-namespace nnc
+namespace mir_caffe2
{
static mir::TensorVariant fixGroupedKernel(int groups, const mir::TensorVariant &folded_kernel)
return _graph->create<ops::InputOp>(name, shape)->getOutput(0);
}
-} // namespace nnc
+} // namespace mir_caffe2
* limitations under the License.
*/
-#ifndef NNCC_CAFFE2_OP_CREATOR_H
-#define NNCC_CAFFE2_OP_CREATOR_H
+#ifndef MIR_CAFFE2_OP_CREATOR_H
+#define MIR_CAFFE2_OP_CREATOR_H
#include <set>
#include <unordered_map>
#include "caffe2/proto/caffe2.pb.h"
-namespace nnc
+namespace mir_caffe2
{
using mir::Operation;
return new_op;
}
-} // namespace nnc
+} // namespace mir_caffe2
-#endif // NNCC_CAFFE2_OP_CREATOR_H
+#endif // MIR_CAFFE2_OP_CREATOR_H
* limitations under the License.
*/
-#ifndef NNCC_CAFFE2_OP_TYPES_H
-#define NNCC_CAFFE2_OP_TYPES_H
+#ifndef MIR_CAFFE2_OP_TYPES_H
+#define MIR_CAFFE2_OP_TYPES_H
-namespace nnc
+namespace mir_caffe2
{
enum class SupportedCaffe2OpType
sum,
};
-} // namespace nnc
+} // namespace mir_caffe2
-#endif // NNCC_CAFFE2_OP_TYPES_H
+#endif // MIR_CAFFE2_OP_TYPES_H
#include "caffe2_proto_helper.h"
-namespace nnc
+namespace mir_caffe2
{
const ::caffe2::Argument &findArgumentByName(RepArgument args, const std::string &name)
return default_value;
}
-} // namespace nnc
+} // namespace mir_caffe2
* limitations under the License.
*/
-#ifndef NNCC_CAFFE2_PROTO_HELPER_H
-#define NNCC_CAFFE2_PROTO_HELPER_H
+#ifndef MIR_CAFFE2_PROTO_HELPER_H
+#define MIR_CAFFE2_PROTO_HELPER_H
#include "caffe2/proto/caffe2.pb.h"
-namespace nnc
+namespace mir_caffe2
{
using RepArgument = const ::google::protobuf::RepeatedPtrField<::caffe2::Argument> &;
std::string getSingleArgument(const ::caffe2::OperatorDef &op, const std::string &argument_name,
const std::string &default_value);
-} // namespace nnc
+} // namespace mir_caffe2
-#endif // NNCC_CAFFE2_PROTO_HELPER_H
+#endif // MIR_CAFFE2_PROTO_HELPER_H
Caffe2ImporterPass::Caffe2ImporterPass(const std::string &predict_net, const std::string &init_net,
const std::vector<std::vector<int>> &input_shapes)
- : _pimpl(new Caffe2Importer(predict_net, init_net, input_shapes))
+ : _pimpl(new mir_caffe2::Caffe2Importer(predict_net, init_net, input_shapes))
{
}
#include <memory>
#include <string>
+namespace mir_caffe2
+{
+class Caffe2Importer;
+} // namespace mir_caffe2
+
namespace nnc
{
-class Caffe2Importer;
class Caffe2ImporterPass : public NNImporter
{
public:
~Caffe2ImporterPass() override;
private:
- std::unique_ptr<Caffe2Importer> _pimpl;
+ std::unique_ptr<mir_caffe2::Caffe2Importer> _pimpl;
std::unique_ptr<mir::Graph> _graph;
};