I have a solver file as shown below.
train_net: "../Prototxtfiles/VGGNet/train.prototxt"
test_net: "../Prototxtfiles/VGGNet/test.prototxt"
test_iter: 172
test_interval: 1000
base_lr: 0.0010000000475
display: 10
max_iter: 30000
lr_policy: "multistep"
gamma: 0.10000000149
momentum: 0.899999976158
weight_decay: 0.000500000023749
snapshot: 5000
snapshot_prefix: "../Prototxtfiles/VGGNet/CROWDSENSING_SSD_500x500"
solver_mode: GPU
device_id: 0
debug_info: false
snapshot_after_train: true
test_initialization: false
average_loss: 10
stepvalue: 10000
stepvalue: 20000
stepvalue: 30000
iter_size: 4
type: "SGD"
eval_type: "detection"
ap_version: "11point"
I tried to read the file using the code below as
bool ReadProtoFromTextFile(const char* filename, Message* proto) {
int fd = open(filename, O_RDONLY);
CHECK_NE(fd, -1) << "File not found: " << filename;
google::protobuf::io::FileInputStream* input = new FileInputStream(fd);
bool success = google::protobuf::TextFormat::Parse(input, proto);
delete input;
close(fd);
return success;
}
I can't parse in Windows but it works in Linux. What could be the issue?
EDIT:
What could be the issue? I can read this prototxt file using the same code.
net: "models/bvlc_googlenet/train_val.prototxt"
test_iter: 1000
test_interval: 4000
test_initialization: false
display: 40
average_loss: 40
base_lr: 0.01
lr_policy: "step"
stepsize: 320000
gamma: 0.96
max_iter: 10000000
momentum: 0.9
weight_decay: 0.0002
snapshot: 40000
snapshot_prefix: "models/bvlc_googlenet/bvlc_googlenet"
solver_mode: GPU