--- /dev/null
+#ifndef NNCC_CAFFE_DUMP_VISITOR_H
+#define NNCC_CAFFE_DUMP_VISITOR_H
+
+#include "caffe_visitor.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace frontend
+{
+namespace caffe
+{
+
+class DumpVisitor : public Visitor
+{
+public:
+ void visit(const NetParameter ¶meter) override;
+ void visit(const LayerParameter ¶meter) override;
+ void visit(const BlobProto &proto) override;
+ void visit(const BlobShape &shape) override;
+};
+
+} // namespace caffe
+} // namespace frontend
+} // namespace contrib
+} // namespace nncc
+
+#endif //NNCC_CAFFE_DUMP_VISITOR_H
--- /dev/null
+#include <iostream>
+
+#include "caffe_dump_visitor.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace frontend
+{
+namespace caffe
+{
+
+using std::cout;
+using std::endl;
+
+std::ostream& operator<<(std::ostream& os, const BlobShape& bs)
+{
+ cout << "[";
+ for (int i = 0; i < bs.dim_size(); ++i)
+ {
+ if (i != 0)
+ cout << ", ";
+ cout << bs.dim(i);
+ }
+ cout << "]";
+
+ return os;
+}
+
+void DumpVisitor::visit(const NetParameter &np)
+{
+ cout << "[Network name]: " << np.name() << endl;
+ cout << "[Network layer_size]: " << np.layer_size() << endl;
+
+ if (np.layers_size() != 0)
+ cout << "[DEPRECATED, Network layers_size]: " << np.layers_size() << endl;
+ if (np.input_size() != 0)
+ cout << "[DEPRECATED, Network input_size]: " << np.input_size() << endl;
+ if (np.input_shape_size() != 0)
+ cout << "[DEPRECATED, Network input_shapes_size]: " << np.input_shape_size() << endl;
+ if (np.input_dim_size() != 0)
+ cout << "[DEPRECATED, Network input_dim_size]: " << np.input_dim_size() << endl;
+}
+
+void DumpVisitor::visit(const LayerParameter &lp)
+{
+ cout << "[" << lp.type() << "]: " << lp.name() << endl;
+
+ for (int i = 0; i < lp.bottom_size(); ++i)
+ cout << " [Input]: " << lp.bottom(i) << endl;
+
+ for (int i = 0; i < lp.top_size(); ++i)
+ cout << " [Output]: " << lp.top(i) << endl;;
+}
+
+void DumpVisitor::visit(const BlobProto &bp)
+{
+ if (bp.has_shape())
+ {
+ cout << " [Blob shape]: ";
+ cout << bp.shape() << endl;
+ }
+}
+
+void DumpVisitor::visit(const BlobShape& bs)
+{
+ cout << " [Blob shape]: ";
+ cout << bs << endl;
+}
+
+} // namespace caffe
+} // namespace frontend
+} // namespace contrib
+} // namespace nncc