c ++ - Caffe Stucking i uendelig sløjfe af blokerende kø, mens du bruger LMDB i Windows cpp?

Indlæg af Hanne Mølgaard Plasc

Problem



Jeg forsøger at træne og teste det enkle netværk til segmentering. Jeg har oprettet LMDB-filen ved hjælp af Windows cpp.


Men mens du laver træning i windows cpp sættes det fast i


 boost::shared\_ptr<caffe::Solver<float> > solver(caffe::SolverRegistry<float>::CreateSolver(solver\_param));


efter fejlfinding fandt jeg det sidder fast i en infinte loop af blokering kø. strømmen er som følger.



  layers\_ [[layer\_id]] -> SetUp (bottom\_vecs\_ [[layer\_id]],
  top\_vecs\_ [[layer\_id]]) -> DataLayerSetUp (nederst, øverst) ----> Dato &
  dato=* (læser\_.full (). kigge ()) ----> Blokeringskø



Det viser disse logfiler i eksekverbart vindue ved kørsel.


[layer\_factory.hpp:77] Creating layer data;
[net.cpp:100] Creating Layer data;
[net.cpp:418] data -> data;


*********** mycaffe.cpp ***************


   Caffe::set\_mode(Caffe::GPU);
        shared\_ptr<Net<float> > net\_;
        net\_.reset(new Net<float>(model\_file, caffe::Phase::TRAIN));

        Caffe::set\_mode(Caffe::GPU);
        caffe::SolverParameter solver\_param;
        caffe::ReadSolverParamsFromTextFileOrDie("mysolver.prototxt", &solver\_param);
        boost::shared\_ptr<caffe::Solver<float> > solver(caffe::SolverRegistry<float>::CreateSolver(solver\_param));
        solver->Solve();


***************** mymodel.prototxt ********************


layer {
  name: "data"
  type: "Data"
  top: "data"

  include {
    phase: TRAIN
  }

  data\_param {
    source: "data\_lmdb"
    batch\_size: 4
    backend: LMDB
  }

}

layer {
  name: "label"
  type: "Data"
  top: "label"

  include {
    phase: TRAIN
  }


  data\_param {
    source: "label\_lmdb"
    batch\_size: 4
    backend: LMDB
  }

}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {
    lr\_mult: 1.0
  }
  param {
    lr\_mult: 0.10000000149
  }
  convolution\_param {
    num\_output: 32
    pad: 1
    kernel\_size: 3
    stride: 1
    weight\_filler {
      type: "gaussian"
      std: 0.0010000000475
    }
    bias\_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}
layer {
  name: "conv2"
  type: "Convolution"
  bottom: "conv1"
  top: "conv2"
  param {
    lr\_mult: 1.0
  }
  param {
    lr\_mult: 0.10000000149
  }
  convolution\_param {
    num\_output: 1024
    pad: 0
    kernel\_size: 16
    stride: 16
    weight\_filler {
      type: "gaussian"
      std: 0.0010000000475
    }
    bias\_filler {
      type: "constant"
      value: 0.0
    }
  }
}
layer {
  name: "relu2"
  type: "ReLU"
  bottom: "conv2"
  top: "conv2"
}
layer {
  name: "upsample"
  type: "Deconvolution"
  bottom: "conv2"
  top: "upsample"
  param {
    lr\_mult: 1.0
  }
  convolution\_param {
    num\_output: 1
    pad: 0
    kernel\_size: 16
    stride: 16
    bias\_filler {
      type: "constant"
      value: 128.0
    }
  }
}
layer {
  name: "lossL1"
  type: "SmoothL1Loss"
  bottom: "upsample"
  bottom: "label"
  top: "lossL1"
  loss\_weight: 1.0
}


******************* mysolver.prototxt ************


test\_initialization: false
base\_lr: 0.01
display: 10
max\_iter: 500000
lr\_policy: "step"
gamma: 0.1
momentum: 0.9
weight\_decay: 0.0001
stepsize: 4069
snapshot: 10000
snapshot\_prefix: "snapshot"
solver\_mode: GPU
net: "mymodel.prototxt"
solver\_type: SGD


Vær venlig at hjælpe mig med at finde ud af fejlen. Tak skal du have.

Bedste reference