void run_lsd(int argc, char **argv) { if(argc < 4){ fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]); return; } int clear = find_arg(argc, argv, "-clear"); int display = find_arg(argc, argv, "-display"); int batches = find_int_arg(argc, argv, "-b", 0); char *file = find_char_arg(argc, argv, "-file", "/home/kunle12/data/imagenet/imagenet1k.train.list"); char *cfg = argv[3]; char *weights = (argc > 4) ? argv[4] : 0; char *filename = (argc > 5) ? argv[5] : 0; char *acfg = argv[5]; char *aweights = (argc > 6) ? argv[6] : 0; //if(0==strcmp(argv[2], "train")) train_lsd(cfg, weights, clear); //else if(0==strcmp(argv[2], "train2")) train_lsd2(cfg, weights, acfg, aweights, clear); //else if(0==strcmp(argv[2], "traincolor")) train_colorizer(cfg, weights, acfg, aweights, clear); //else if(0==strcmp(argv[2], "train3")) train_lsd3(argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], clear); if(0==strcmp(argv[2], "traingan")) train_dcgan(cfg, weights, acfg, aweights, clear, display, file, batches); else if(0==strcmp(argv[2], "trainprog")) train_prog(cfg, weights, acfg, aweights, clear, display, file, batches); else if(0==strcmp(argv[2], "traincolor")) train_colorizer(cfg, weights, acfg, aweights, clear, display); else if(0==strcmp(argv[2], "gan")) test_dcgan(cfg, weights); else if(0==strcmp(argv[2], "inter")) inter_dcgan(cfg, weights); else if(0==strcmp(argv[2], "test")) test_lsd(cfg, weights, filename, 0); else if(0==strcmp(argv[2], "color")) test_lsd(cfg, weights, filename, 1); /* else if(0==strcmp(argv[2], "valid")) validate_lsd(cfg, weights); */ }
void run_lsd(int argc, char **argv) { if(argc < 4){ fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]); return; } int clear = find_arg(argc, argv, "-clear"); char *cfg = argv[3]; char *weights = (argc > 4) ? argv[4] : 0; char *filename = (argc > 5) ? argv[5] : 0; char *acfg = argv[5]; char *aweights = (argc > 6) ? argv[6] : 0; if(0==strcmp(argv[2], "train")) train_lsd(cfg, weights, clear); else if(0==strcmp(argv[2], "train2")) train_lsd2(cfg, weights, acfg, aweights, clear); else if(0==strcmp(argv[2], "traincolor")) train_colorizer(cfg, weights, acfg, aweights, clear); else if(0==strcmp(argv[2], "train3")) train_lsd3(argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], clear); else if(0==strcmp(argv[2], "test")) test_lsd(cfg, weights, filename); /* else if(0==strcmp(argv[2], "valid")) validate_lsd(cfg, weights); */ }