Skip to content

Commit

Permalink
report error when use parallel_nn to train recurrent_nn model (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedaoyuan authored and emailweixu committed Nov 3, 2016
1 parent 5f2059d commit 1de75c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions paddle/gserver/gradientmachines/ParallelNeuralNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ void ParallelNeuralNetwork::init(
const std::vector<ParameterType>& parameterTypes, bool useGpu) {
NeuralNetwork::init(config, callback, parameterTypes, useGpu);

if (config.type() == "recurrent_nn") {
LOG(FATAL)
<< "You can not add `--parallel_nn=true` on the command line, "
<< "parallel_nn training mode does not support the recurrent_nn model.";
}

useGpu_ = useGpu;
numDevices_ = 0;
if (useGpu_) {
Expand Down

0 comments on commit 1de75c0

Please sign in to comment.