提交 f6e1c268 编写于 作者: Z zp7 提交者: Yanzhan Yang

fix compile error (#1955)

上级 833c405d
......@@ -67,8 +67,8 @@ int TestGruOp(int in_channels, int out_channels, std::string opname) {
auto hidden_var = scope.get()->Var("output_hidden");
framework::AttributeMap attrs;
attrs["activation"].SetString(std::string("relu"));
attrs["gate_activation"].SetString(std::string("sigmoid"));
attrs["activation"].Set<std::string>(std::string("relu"));
attrs["gate_activation"].Set<std::string>(std::string("sigmoid"));
attrs["is_reverse"].Set<bool>(false);
auto *op = new operators::GruOp<CPU, float>("gru", inputs, outputs, attrs,
......
......@@ -55,7 +55,7 @@ int TestPoolOp(int in_channels, int in_height, int in_width) {
auto output_var = scope.get()->Var("output");
framework::AttributeMap attrs;
attrs["pooling_type"].SetString(pooling_type);
attrs["pooling_type"].Set<std::string>(pooling_type);
attrs["ksize"].Set<vector<int>>(std::vector<int>({kernel_h, kernel_w}));
attrs["strides"].Set<vector<int>>(std::vector<int>({stride_h, stride_w}));
attrs["paddings"].Set<vector<int>>(std::vector<int>({pad_h, pad_w}));
......
......@@ -36,7 +36,7 @@ int TestSequencePoolOp(const framework::LoDTensor &input_x,
auto output_var = scope.get()->Var("output");
framework::AttributeMap attrs;
attrs["pooltype"].SetString(pool_type);
attrs["pooltype"].Set<std::string>(pool_type);
auto *op = new operators::SequencePoolOp<CPU, float>(
"sequence_pool", inputs, outputs, attrs, scope.get());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册