Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
c25e8465
提交
c25e8465
authored
7月 23, 2015
作者:
Iban Harlouchet
提交者:
Arnaud Bergeron
9月 08, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
testcode for doc/extending/ctype.txt
上级
4959dd28
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
10 行删除
+14
-10
ctype.txt
doc/extending/ctype.txt
+14
-10
没有找到文件。
doc/extending/ctype.txt
浏览文件 @
c25e8465
...
@@ -156,12 +156,16 @@ out:
...
@@ -156,12 +156,16 @@ out:
Defining the methods
Defining the methods
====================
====================
.. testsetup::
import theano
.. If you modify this code, also change :
.. If you modify this code, also change :
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
**c_declare**
**c_declare**
..
code-block:: python
..
testcode::
def c_declare(name, sub):
def c_declare(name, sub):
return """
return """
...
@@ -194,7 +198,7 @@ it, it's best to publish it somewhere.
...
@@ -194,7 +198,7 @@ it, it's best to publish it somewhere.
**c_init**
**c_init**
..
code-block:: python
..
testcode::
def c_init(name, sub):
def c_init(name, sub):
return """
return """
...
@@ -223,7 +227,7 @@ called, without knowing for sure which of the two.
...
@@ -223,7 +227,7 @@ called, without knowing for sure which of the two.
**c_extract**
**c_extract**
..
code-block:: python
..
testcode::
def c_extract(name, sub):
def c_extract(name, sub):
return """
return """
...
@@ -262,7 +266,7 @@ API) and we put it in our double variable that we declared previously.
...
@@ -262,7 +266,7 @@ API) and we put it in our double variable that we declared previously.
**c_sync**
**c_sync**
..
code-block:: python
..
testcode::
def c_sync(name, sub):
def c_sync(name, sub):
return """
return """
...
@@ -324,7 +328,7 @@ than sorry.
...
@@ -324,7 +328,7 @@ than sorry.
**c_cleanup**
**c_cleanup**
..
code-block:: python
..
testcode::
def c_cleanup(name, sub):
def c_cleanup(name, sub):
return ""
return ""
...
@@ -373,7 +377,7 @@ and call it:
...
@@ -373,7 +377,7 @@ and call it:
.. If you modify this code, also change :
.. If you modify this code, also change :
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
..
code-block:: python
..
testcode::
from theano import function
from theano import function
from theano.tensor import double
from theano.tensor import double
...
@@ -462,7 +466,7 @@ Final version
...
@@ -462,7 +466,7 @@ Final version
.. If you modify this code, also change :
.. If you modify this code, also change :
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
.. theano/tests/test_tutorial.py:T_extending.test_extending_2
..
code-block:: python
..
testcode::
from theano import gof
from theano import gof
...
@@ -526,7 +530,7 @@ know how to generate C code.
...
@@ -526,7 +530,7 @@ know how to generate C code.
You can implement c_code for this op. You register it like this:
You can implement c_code for this op. You register it like this:
..
code-block:: python
..
testcode::
theano.compile.ops.register_deep_copy_op_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
theano.compile.ops.register_deep_copy_op_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
...
@@ -548,7 +552,7 @@ ViewOp to generate C code when working with this type, as
...
@@ -548,7 +552,7 @@ ViewOp to generate C code when working with this type, as
otherwise it will use Python code instead. This is achieved by
otherwise it will use Python code instead. This is achieved by
calling:
calling:
..
code-block:: python
..
testcode::
theano.compile.ops.register_view_op_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
theano.compile.ops.register_view_op_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
...
@@ -568,7 +572,7 @@ Theano Variable that has a shape attribute (Shape_i returns only one of
...
@@ -568,7 +572,7 @@ Theano Variable that has a shape attribute (Shape_i returns only one of
the elements of the shape).
the elements of the shape).
..
code-block:: python
..
testcode::
theano.compile.ops.register_shape_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
theano.compile.ops.register_shape_c_code(YOUR_TYPE_CLASS, THE_C_CODE, version=())
theano.compile.ops.register_shape_i_c_code(YOUR_TYPE_CLASS, THE_C_CODE, CHECK_INPUT, version=())
theano.compile.ops.register_shape_i_c_code(YOUR_TYPE_CLASS, THE_C_CODE, CHECK_INPUT, version=())
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论