Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b39f256c
提交
b39f256c
authored
8月 12, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
typo/comment following code review.
上级
e132aedb
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
33 行删除
+16
-33
configdefaults.py
theano/configdefaults.py
+1
-1
basic.py
theano/scalar/basic.py
+15
-32
没有找到文件。
theano/configdefaults.py
浏览文件 @
b39f256c
...
...
@@ -391,7 +391,7 @@ AddConfigVar('compute_test_value',
AddConfigVar
(
'compute_test_value_opt'
,
(
"For debugging Theano optimization only."
" Same as compute_test_value, but is used"
" durin
t Theano optimizatoi
n"
),
" durin
g Theano optimizatio
n"
),
EnumStr
(
'off'
,
'ignore'
,
'warn'
,
'raise'
,
'pdb'
),
in_c_key
=
False
)
...
...
theano/scalar/basic.py
浏览文件 @
b39f256c
...
...
@@ -183,40 +183,23 @@ class Scalar(Type):
def
dtype_specs
(
self
):
try
:
# To help debug dtype/typenum problem, here is the list of numpy typenum.
# To help debug dtype/typenum problem, here is code to get
# the list of numpy typenum. This list change between 32
# and 64 bit platform and probably also also between
# Windows and Linux.
# NOTE: equivalent type on a platform can have different typenum.
# This is the source of all dtype/typenum problem found up to
# now, as Theano always expect the exact typenum that
# correspond to our supported dtype.
"""
for dtype in ['int8','uint8','short','ushort','intc','uintc', 'longlong','ulonglong','single','double','longdouble', 'csingle','cdouble','clongdouble', 'float32', 'float64', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', 'complex64', 'complex128', 'float', 'double', 'int', 'uint']:
for dtype in ['int8', 'uint8', 'short', 'ushort', 'intc', 'uintc',
'longlong', 'ulonglong', 'single', 'double',
'longdouble', 'csingle', 'cdouble', 'clongdouble',
'float32', 'float64', 'int8', 'int16', 'int32',
'int64', 'uint8', 'uint16', 'uint32', 'uint64',
'complex64', 'complex128', 'float', 'double',
'int', 'uint']:
print dtype, np.zeros(1, dtype=dtype).dtype.num
int8 1
uint8 2
short 3
ushort 4
intc 5
uintc 6
longlong 9
ulonglong 10
single 11
double 12
longdouble 13
csingle 14
cdouble 15
clongdouble 16
float32 11
float64 12
int8 1
int16 3
int32 5
int64 7
uint8 2
uint16 4
uint32 6
uint64 8
complex64 14
complex128 15
float 12
double 12
int 7
uint 8
"""
return
{
# dtype: (py_type, c_type, cls_name)
'float32'
:
(
numpy
.
float32
,
'npy_float32'
,
'Float32'
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论