зеркало из https://github.com/microsoft/caffe.git
tools should have nonzero error exit codes
This commit is contained in:
Родитель
71136b0bb7
Коммит
48cbcb617f
|
@ -18,7 +18,7 @@ int main(int argc, char** argv) {
|
||||||
::google::InitGoogleLogging(argv[0]);
|
::google::InitGoogleLogging(argv[0]);
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
LOG(ERROR) << "Usage: compute_image_mean input_leveldb output_file";
|
LOG(ERROR) << "Usage: compute_image_mean input_leveldb output_file";
|
||||||
return(0);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
leveldb::DB* db;
|
leveldb::DB* db;
|
||||||
|
|
|
@ -38,7 +38,7 @@ int main(int argc, char** argv) {
|
||||||
" RANDOM_SHUFFLE_DATA[0 or 1]\n"
|
" RANDOM_SHUFFLE_DATA[0 or 1]\n"
|
||||||
"The ImageNet dataset for the training demo is at\n"
|
"The ImageNet dataset for the training demo is at\n"
|
||||||
" http://www.image-net.org/download-images\n");
|
" http://www.image-net.org/download-images\n");
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
std::ifstream infile(argv[2]);
|
std::ifstream infile(argv[2]);
|
||||||
std::vector<std::pair<string, int> > lines;
|
std::vector<std::pair<string, int> > lines;
|
||||||
|
|
|
@ -10,7 +10,7 @@ using namespace caffe; // NOLINT(build/namespaces)
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
LOG(ERROR) << "device_query [device_id=0]";
|
LOG(ERROR) << "device_query [device_id=0]";
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
LOG(INFO) << "Querying device_id=" << argv[1];
|
LOG(INFO) << "Querying device_id=" << argv[1];
|
||||||
|
|
|
@ -16,7 +16,7 @@ int main(int argc, char** argv) {
|
||||||
::google::InitGoogleLogging(argv[0]);
|
::google::InitGoogleLogging(argv[0]);
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
LOG(ERROR) << "Usage: finetune_net solver_proto_file pretrained_net";
|
LOG(ERROR) << "Usage: finetune_net solver_proto_file pretrained_net";
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SolverParameter solver_param;
|
SolverParameter solver_param;
|
||||||
|
|
|
@ -25,7 +25,7 @@ int main(int argc, char** argv) {
|
||||||
if (argc < 2 || argc > 5) {
|
if (argc < 2 || argc > 5) {
|
||||||
LOG(ERROR) << "net_speed_benchmark net_proto [iterations=50]"
|
LOG(ERROR) << "net_speed_benchmark net_proto [iterations=50]"
|
||||||
" [CPU/GPU] [Device_id=0]";
|
" [CPU/GPU] [Device_id=0]";
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc >=3) {
|
if (argc >=3) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ int main(int argc, char** argv) {
|
||||||
if (argc < 4 || argc > 5) {
|
if (argc < 4 || argc > 5) {
|
||||||
LOG(ERROR) << "test_net net_proto pretrained_net_proto iterations "
|
LOG(ERROR) << "test_net net_proto pretrained_net_proto iterations "
|
||||||
<< "[CPU/GPU]";
|
<< "[CPU/GPU]";
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cudaSetDevice(0);
|
cudaSetDevice(0);
|
||||||
|
|
|
@ -17,7 +17,7 @@ int main(int argc, char** argv) {
|
||||||
::google::InitGoogleLogging(argv[0]);
|
::google::InitGoogleLogging(argv[0]);
|
||||||
if (argc < 2 || argc > 3) {
|
if (argc < 2 || argc > 3) {
|
||||||
LOG(ERROR) << "Usage: train_net solver_proto_file [resume_point_file]";
|
LOG(ERROR) << "Usage: train_net solver_proto_file [resume_point_file]";
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SolverParameter solver_param;
|
SolverParameter solver_param;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче