提交 7f42793e 编写于 作者: L LCY-Seso 提交者: GitHub

Merge pull request #1651 from luotao1/seqPool

remove unnecessary param in degradeSequence
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册