remove unnecessary param in degradeSequence

release/0.10.0
Luo Tao 8 years ago
parent a7730d409b
commit f6f9fd7a66

@ -56,17 +56,16 @@ void SequencePoolLayer::forward(PassType passType) {
CHECK_EQ(newBatchSize_, starts->getSize() - 1);
resetOutput(newBatchSize_, dim);
if (type_) {
CHECK(input.subSequenceStartPositions)
<< "when trans_type = seq, input must hasSubseq";
}
/* If type_ = kNonSeq, both seq has or not has sub-seq degrade to a non-seq,
* thus, in this case, output_ has no sequenceStartPositions.
* If type_ = kSeq, seq has sub-seq degrades to a seq, thus, only in this
* case, we should compute the new sequenceStartPositions.
*/
if (type_) {
output_.degradeSequence(input, useGpu_);
CHECK(input.subSequenceStartPositions)
<< "when trans_type = seq, input must hasSubseq";
output_.degradeSequence(input);
}
}

@ -583,7 +583,7 @@ void Argument::checkSubset() const {
}
}
void Argument::degradeSequence(const Argument& input, bool useGpu) {
void Argument::degradeSequence(const Argument& input) {
CHECK_EQ(input.hasSubseq(), 1UL);
size_t numSequences = input.getNumSequences();
size_t numSubSequences = input.getNumSubSequences();

@ -296,7 +296,7 @@ struct Argument {
/*
sequence has sub-sequence degrades to a sequence.
*/
void degradeSequence(const Argument& input, bool useGpu);
void degradeSequence(const Argument& input);
/**
* @brief getValueString will return the argument's output in string. There

Loading…
Cancel
Save