提交 74f76e61 编写于 作者: D dangqingqing

update code and fix bug

上级 6db642ff
...@@ -92,9 +92,9 @@ public: ...@@ -92,9 +92,9 @@ public:
void calc(const Arguments& inputs, void calc(const Arguments& inputs,
const Arguments& outputs, const Arguments& outputs,
const Arguments& inouts) override { const Arguments& inouts) override {
CHECK_EQ(1, inputs.size()); CHECK_EQ(1UL, inputs.size());
CHECK_EQ(1, outputs.size()); CHECK_EQ(1UL, outputs.size());
CHECK_EQ(0, inouts.size()); CHECK_EQ(0UL, inouts.size());
size_t num = inputs[0].dims_[0]; size_t num = inputs[0].dims_[0];
size_t inC = inputs[0].dims_[1]; size_t inC = inputs[0].dims_[1];
...@@ -143,9 +143,9 @@ public: ...@@ -143,9 +143,9 @@ public:
void calc(const Arguments& inputs, void calc(const Arguments& inputs,
const Arguments& outputs, const Arguments& outputs,
const Arguments& inouts) override { const Arguments& inouts) override {
CHECK_EQ(1, inputs.size()); CHECK_EQ(1UL, inputs.size());
CHECK_EQ(0, outputs.size()); CHECK_EQ(0UL, outputs.size());
CHECK_EQ(1, inouts.size()); CHECK_EQ(1UL, inouts.size());
size_t n = inouts[0].dims_[0]; size_t n = inouts[0].dims_[0];
size_t inC = inouts[0].dims_[1]; size_t inC = inouts[0].dims_[1];
......
...@@ -62,7 +62,7 @@ TEST(PadGrad, real) { ...@@ -62,7 +62,7 @@ TEST(PadGrad, real) {
Dims inDims{numSamples, channels, imgSizeH, imgSizeW}; Dims inDims{numSamples, channels, imgSizeH, imgSizeW};
Dims outDims{numSamples, channels + 5, imgSizeH + 3, imgSizeW + 5}; Dims outDims{numSamples, channels + 5, imgSizeH + 3, imgSizeW + 5};
compare.cmpWithArg( compare.cmpWithArg(
{Tensor(nullptr, inDims)}, {}, {Tensor(nullptr, outDims)}); {Tensor(nullptr, outDims)}, {}, {Tensor(nullptr, inDims)});
} }
} }
} }
......
...@@ -850,15 +850,13 @@ TEST(Layer, SequenceLastInstanceLayer) { ...@@ -850,15 +850,13 @@ TEST(Layer, SequenceLastInstanceLayer) {
testDegradeLayer(true, testDegradeLayer(true,
"seqlastins", "seqlastins",
"non-seq"); // hasSubseq seqlastins to non-seq "non-seq"); // hasSubseq seqlastins to non-seq
testDegradeLayer(true, "seqlastins", "seq"); // hasSubseq seqlastins to testDegradeLayer(true, "seqlastins", "seq"); // hasSubseq seqlastins to seq
seq
} }
TEST(Layer, AverageLayer) { TEST(Layer, AverageLayer) {
testDegradeLayer(false, "average", "non-seq"); // seq average to non-seq testDegradeLayer(false, "average", "non-seq"); // seq average to non-seq
testDegradeLayer(true, "average", "non-seq"); // hasSubseq average to testDegradeLayer(true, "average", "non-seq"); // hasSubseq average to non-seq
non - testDegradeLayer(true, "average", "seq"); // hasSubseq average to seq
seq testDegradeLayer(true, "average", "seq"); // hasSubseq average to seq
} }
TEST(Layer, SequenceConcatLayer) { TEST(Layer, SequenceConcatLayer) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册