Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a8242ddf
提交
a8242ddf
authored
9月 23, 2008
作者:
james@crane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more better docs for type
上级
c72934ba
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
20 行增加
和
9 行删除
+20
-9
type.py
gof/type.py
+9
-8
local.epydoc
local.epydoc
+11
-1
没有找到文件。
gof/type.py
浏览文件 @
a8242ddf
...
@@ -240,6 +240,9 @@ class PureType(object):
...
@@ -240,6 +240,9 @@ class PureType(object):
return
r
return
r
_nothing
=
"""
"""
class
Type
(
object2
,
PureType
,
CLinkerType
):
class
Type
(
object2
,
PureType
,
CLinkerType
):
"""Convenience wrapper combining `PureType` and `CLinkerType`.
"""Convenience wrapper combining `PureType` and `CLinkerType`.
...
@@ -254,15 +257,14 @@ class Type(object2, PureType, CLinkerType):
...
@@ -254,15 +257,14 @@ class Type(object2, PureType, CLinkerType):
But you are encouraged to write your own, as described in WRITEME.
But you are encouraged to write your own, as described in WRITEME.
In the following code:
The following following code illustrates the use of a Type instance, here tensor.fvector:
.. python::
# Note: tensor.fvector is a Type (subtype Tensor) instance
# Declare a symbolic floating-point vector using __call__
b = tensor.fvector()
# Create a second Result with the same Type instance
.. python::
c = tensor.fvector()
# Declare a symbolic floating-point vector using __call__
b = tensor.fvector()
# Create a second Result with the same Type instance
c = tensor.fvector()
Whenever you create a symbolic variable in theano (technically, `Result`) it will contain a
Whenever you create a symbolic variable in theano (technically, `Result`) it will contain a
reference to a Type instance. That reference is typically constant during the lifetime of
reference to a Type instance. That reference is typically constant during the lifetime of
...
@@ -276,7 +278,6 @@ class Type(object2, PureType, CLinkerType):
...
@@ -276,7 +278,6 @@ class Type(object2, PureType, CLinkerType):
Many `Op` instances will raise an exception if they are applied to inputs with incorrect
Many `Op` instances will raise an exception if they are applied to inputs with incorrect
types. Type references are also useful to do type-checking in pattern-based optimizations.
types. Type references are also useful to do type-checking in pattern-based optimizations.
"""
"""
class
SingletonType
(
Type
):
class
SingletonType
(
Type
):
...
...
local.epydoc
浏览文件 @
a8242ddf
...
@@ -7,7 +7,17 @@
...
@@ -7,7 +7,17 @@
# The list of objects to document. Objects can be named using
# The list of objects to document. Objects can be named using
# dotted names, module filenames, or package directory names.
# dotted names, module filenames, or package directory names.
# Alases for this option include "objects" and "values".
# Alases for this option include "objects" and "values".
modules: *.py, gof/*.py
modules: *.py, gof/__init__.py,
gof/a*,
gof/c*,
gof/d*,
gof/e*,
gof/g*,
gof/l*,
gof/o*,
gof/p*,
gof/t*,
gof/u*
# The type of output that should be generated. Should be one
# The type of output that should be generated. Should be one
# of: html, text, latex, dvi, ps, pdf.
# of: html, text, latex, dvi, ps, pdf.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论