提交 e6b0d744 编写于 作者: T Travis CI

Deploy to GitHub Pages: fee6e7fb

上级 36fd134d
......@@ -147,7 +147,7 @@ class CosineOp {
struct CosineOpProtoMaker : public OpProtoMaker {
CosineOpProtoMaker(OpProto* proto) : OpProtoMaker(proto) {
AddInput("input", "input of cosine op");
AddAttr("scale", "scale of cosine op", float).Default(1.0).LargerThan(0.0);
AddAttr("scale", "scale of cosine op", float).Default(1.0).GreaterThan(0.0);
AddType("cos");
AddComment("This is cos op");
}
......
......@@ -318,7 +318,7 @@ create_python_ops_creatation_functions()
<span class="k">struct</span> <span class="nl">CosineOpProtoMaker</span> <span class="p">:</span> <span class="k">public</span> <span class="n">OpProtoMaker</span> <span class="p">{</span>
<span class="n">CosineOpProtoMaker</span><span class="p">(</span><span class="n">OpProto</span><span class="o">*</span> <span class="n">proto</span><span class="p">)</span> <span class="o">:</span> <span class="n">OpProtoMaker</span><span class="p">(</span><span class="n">proto</span><span class="p">)</span> <span class="p">{</span>
<span class="n">AddInput</span><span class="p">(</span><span class="s">&quot;input&quot;</span><span class="p">,</span> <span class="s">&quot;input of cosine op&quot;</span><span class="p">);</span>
<span class="n">AddAttr</span><span class="p">(</span><span class="s">&quot;scale&quot;</span><span class="p">,</span> <span class="s">&quot;scale of cosine op&quot;</span><span class="p">,</span> <span class="kt">float</span><span class="p">).</span><span class="n">Default</span><span class="p">(</span><span class="mf">1.0</span><span class="p">).</span><span class="n">LargerThan</span><span class="p">(</span><span class="mf">0.0</span><span class="p">);</span>
<span class="n">AddAttr</span><span class="p">(</span><span class="s">&quot;scale&quot;</span><span class="p">,</span> <span class="s">&quot;scale of cosine op&quot;</span><span class="p">,</span> <span class="kt">float</span><span class="p">).</span><span class="n">Default</span><span class="p">(</span><span class="mf">1.0</span><span class="p">).</span><span class="n">GreaterThan</span><span class="p">(</span><span class="mf">0.0</span><span class="p">);</span>
<span class="n">AddType</span><span class="p">(</span><span class="s">&quot;cos&quot;</span><span class="p">);</span>
<span class="n">AddComment</span><span class="p">(</span><span class="s">&quot;This is cos op&quot;</span><span class="p">);</span>
<span class="p">}</span>
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -147,7 +147,7 @@ class CosineOp {
struct CosineOpProtoMaker : public OpProtoMaker {
CosineOpProtoMaker(OpProto* proto) : OpProtoMaker(proto) {
AddInput("input", "input of cosine op");
AddAttr("scale", "scale of cosine op", float).Default(1.0).LargerThan(0.0);
AddAttr("scale", "scale of cosine op", float).Default(1.0).GreaterThan(0.0);
AddType("cos");
AddComment("This is cos op");
}
......
......@@ -325,7 +325,7 @@ create_python_ops_creatation_functions()
<span class="k">struct</span> <span class="nl">CosineOpProtoMaker</span> <span class="p">:</span> <span class="k">public</span> <span class="n">OpProtoMaker</span> <span class="p">{</span>
<span class="n">CosineOpProtoMaker</span><span class="p">(</span><span class="n">OpProto</span><span class="o">*</span> <span class="n">proto</span><span class="p">)</span> <span class="o">:</span> <span class="n">OpProtoMaker</span><span class="p">(</span><span class="n">proto</span><span class="p">)</span> <span class="p">{</span>
<span class="n">AddInput</span><span class="p">(</span><span class="s">&quot;input&quot;</span><span class="p">,</span> <span class="s">&quot;input of cosine op&quot;</span><span class="p">);</span>
<span class="n">AddAttr</span><span class="p">(</span><span class="s">&quot;scale&quot;</span><span class="p">,</span> <span class="s">&quot;scale of cosine op&quot;</span><span class="p">,</span> <span class="kt">float</span><span class="p">).</span><span class="n">Default</span><span class="p">(</span><span class="mf">1.0</span><span class="p">).</span><span class="n">LargerThan</span><span class="p">(</span><span class="mf">0.0</span><span class="p">);</span>
<span class="n">AddAttr</span><span class="p">(</span><span class="s">&quot;scale&quot;</span><span class="p">,</span> <span class="s">&quot;scale of cosine op&quot;</span><span class="p">,</span> <span class="kt">float</span><span class="p">).</span><span class="n">Default</span><span class="p">(</span><span class="mf">1.0</span><span class="p">).</span><span class="n">GreaterThan</span><span class="p">(</span><span class="mf">0.0</span><span class="p">);</span>
<span class="n">AddType</span><span class="p">(</span><span class="s">&quot;cos&quot;</span><span class="p">);</span>
<span class="n">AddComment</span><span class="p">(</span><span class="s">&quot;This is cos op&quot;</span><span class="p">);</span>
<span class="p">}</span>
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册