Skip to content

Commit

Permalink
Remove caffe1 specific proto (pytorch#10380)
Browse files Browse the repository at this point in the history
Summary:
This was used as a convenient way for us to convert c1 models. Now that conversion is more or less done, we should probably require any users who need to convert c1 models to explicitly install c1. This PR removes the explicit c1 proto (which was copied from c1) in favor of explicit installation.

Note that caffe_translator would still work properly, only difference is that now users need to install c1 separately.
Pull Request resolved: pytorch#10380

Differential Revision: D9267981

Pulled By: Yangqing

fbshipit-source-id: a6ce5d9463e6567976da83f2d08b2c3d94d14390
  • Loading branch information
Yangqing authored and facebook-github-bot committed Aug 10, 2018
1 parent 018790c commit 40109b1
Show file tree
Hide file tree
Showing 22 changed files with 60 additions and 1,456 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ include_directories(BEFORE ${PROJECT_BINARY_DIR})

include_directories(BEFORE ${PROJECT_SOURCE_DIR}/aten/src/)

# ---[ Old caffe protobuf
if(BUILD_CAFFE2)
add_subdirectory(caffe/proto)
endif()

# ---[ Main build
add_subdirectory(caffe2)

Expand Down
5 changes: 3 additions & 2 deletions binaries/convert_caffe_image_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "caffe2/core/db.h"
#include "caffe2/core/init.h"
#include "caffe2/proto/caffe2.pb.h"
#include "caffe/proto/caffe.pb.h"
#include "caffe2/proto/caffe2_legacy.pb.h"
#include "caffe2/core/logging.h"

CAFFE2_DEFINE_string(input_db, "", "The input db.");
Expand All @@ -29,6 +29,7 @@ CAFFE2_DEFINE_int(batch_size, 1000, "The write batch size.");
using caffe2::db::Cursor;
using caffe2::db::DB;
using caffe2::db::Transaction;
using caffe2::CaffeDatum;
using caffe2::TensorProto;
using caffe2::TensorProtos;

Expand All @@ -43,7 +44,7 @@ int main(int argc, char** argv) {
std::unique_ptr<Transaction> transaction(out_db->NewTransaction());
int count = 0;
for (; cursor->Valid(); cursor->Next()) {
caffe::Datum datum;
CaffeDatum datum;
CAFFE_ENFORCE(datum.ParseFromString(cursor->value()));
TensorProtos protos;
TensorProto* data = protos.add_protos();
Expand Down
Empty file removed caffe/__init__.py
Empty file.
17 changes: 0 additions & 17 deletions caffe/proto/CMakeLists.txt

This file was deleted.

Empty file removed caffe/proto/__init__.py
Empty file.
Loading

0 comments on commit 40109b1

Please sign in to comment.