Set phase to TRAIN when performing backward pass
authorJames Thewlis <jamt9000@gmail.com>
Tue, 18 Mar 2014 09:28:09 +0000 (09:28 +0000)
committerJames Thewlis <jamt9000@gmail.com>
Tue, 18 Mar 2014 09:28:09 +0000 (09:28 +0000)
tools/dump_network.cpp

index 6448ce6..286de48 100644 (file)
@@ -61,6 +61,7 @@ int main(int argc, char** argv) {
   caffe_net->Forward(input_vec);
   if (argc > 5 && strcmp(argv[5], "1") == 0) {
     LOG(ERROR) << "Performing Backward";
+    Caffe::set_phase(Caffe::TRAIN);
     caffe_net->Backward();
     // Dump the network
     NetParameter output_net_param;