Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8ac5ab98
提交
8ac5ab98
authored
4月 18, 2012
作者:
David Warde-Farley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Yet more dangerous default arguments.
上级
7f090ddd
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
30 行增加
和
12 行删除
+30
-12
debugmode.py
theano/compile/debugmode.py
+6
-3
cmodule.py
theano/gof/cmodule.py
+8
-1
pycuda_example.py
theano/misc/pycuda_example.py
+3
-1
debug.py
theano/sandbox/debug.py
+10
-6
basic.py
theano/tensor/basic.py
+3
-1
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
8ac5ab98
...
...
@@ -504,9 +504,9 @@ def char_from_number(number):
def
debugprint
(
r
,
prefix
=
''
,
depth
=-
1
,
done
=
None
,
print_type
=
False
,
file
=
sys
.
stdout
,
print_destroy_map
=
False
,
print_view_map
=
False
,
order
=
[],
ids
=
'CHAR'
,
stop_on_name
=
False
,
prefix_child
=
None
):
file
=
sys
.
stdout
,
print_destroy_map
=
False
,
print_view_map
=
False
,
order
=
None
,
ids
=
'CHAR'
,
stop_on_name
=
False
,
prefix_child
=
None
):
"""Print the graph leading to `r` to given depth.
:param r: Variable instance
...
...
@@ -531,6 +531,9 @@ def debugprint(r, prefix='', depth=-1, done=None, print_type=False,
if
depth
==
0
:
return
if
order
is
None
:
order
=
[]
if
done
is
None
:
done
=
dict
()
...
...
theano/gof/cmodule.py
浏览文件 @
8ac5ab98
...
...
@@ -1411,7 +1411,8 @@ class GCC_compiler(object):
@staticmethod
def
compile_str
(
module_name
,
src_code
,
location
=
None
,
include_dirs
=
[],
lib_dirs
=
[],
libs
=
[],
preargs
=
[]):
include_dirs
=
None
,
lib_dirs
=
None
,
libs
=
None
,
preargs
=
None
):
"""
:param module_name: string (this has been embedded in the src_code
...
...
@@ -1435,6 +1436,12 @@ class GCC_compiler(object):
"""
#TODO: Do not do the dlimport in this function
if
include_dirs
is
None
:
preargs
=
[]
if
lib_dirs
is
None
:
lib_dirs
=
[]
if
libs
is
None
:
libs
=
[]
if
preargs
is
None
:
preargs
=
[]
else
:
...
...
theano/misc/pycuda_example.py
浏览文件 @
8ac5ab98
...
...
@@ -54,7 +54,9 @@ def theano_parse_c_arg(c_arg):
"""
class TheanoElementwiseKernel(pycuda.elementwise.ElementwiseKernel):
def __init__(self, arguments, operation,
name="kernel", keep=False, options=[], **kwargs):
name="kernel", keep=False, options=None, **kwargs):
if options is None:
options = []
if isinstance(arguments, basestring):
arguments = [theano_parse_c_arg(arg)
for arg in arguments.split(",")]
...
...
theano/sandbox/debug.py
浏览文件 @
8ac5ab98
...
...
@@ -10,12 +10,16 @@ class DebugLinker(gof.WrapLinker):
def
__init__
(
self
,
linkers
,
debug_pre
=
[],
debug_post
=
[],
copy_originals
=
False
,
check_types
=
True
,
compare_variables
=
True
,
compare_fn
=
(
lambda
x
,
y
:
x
==
y
)):
debug_pre
=
None
,
debug_post
=
None
,
copy_originals
=
False
,
check_types
=
True
,
compare_variables
=
True
,
compare_fn
=
(
lambda
x
,
y
:
x
==
y
)):
if
debug_pre
is
None
:
debug_pre
=
[]
if
debug_post
is
None
:
debug_post
=
[]
gof
.
WrapLinker
.
__init__
(
self
,
linkers
=
linkers
,
wrapper
=
self
.
wrapper
)
...
...
theano/tensor/basic.py
浏览文件 @
8ac5ab98
...
...
@@ -4089,7 +4089,9 @@ class IncSubtensor(Op):
"""
def
__init__
(
self
,
idx_list
,
inplace
=
False
,
set_instead_of_inc
=
False
,
destroyhandler_tolerate_aliased
=
[]):
destroyhandler_tolerate_aliased
=
None
):
if
destroyhandler_tolerate_aliased
is
None
:
destroyhandler_tolerate_aliased
=
[]
self
.
idx_list
=
map
(
Subtensor
.
convert
,
idx_list
)
self
.
inplace
=
inplace
if
inplace
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论