Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4e04ed1e
提交
4e04ed1e
authored
9月 10, 2015
作者:
carriepl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make cython backend work with mode=FAST_COMPILE
上级
b0d2b83c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
5 行删除
+17
-5
scan_perform.c
theano/scan_module/scan_perform.c
+0
-0
scan_perform.pyx
theano/scan_module/scan_perform.pyx
+17
-5
没有找到文件。
theano/scan_module/scan_perform.c
浏览文件 @
4e04ed1e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
theano/scan_module/scan_perform.pyx
浏览文件 @
4e04ed1e
...
@@ -382,7 +382,7 @@ def perform(
...
@@ -382,7 +382,7 @@ def perform(
else:
else:
old_input_data[idx] = None
old_input_data[idx] = None
# 5. compute outputs
# 5.
0.1
compute outputs
t0_fn = time.time()
t0_fn = time.time()
try:
try:
...
@@ -403,8 +403,20 @@ def perform(
...
@@ -403,8 +403,20 @@ def perform(
pdx = offset + n_shared_outs
pdx = offset + n_shared_outs
cond = output_storage[pdx].storage[0] == 0
cond = output_storage[pdx].storage[0] == 0
# Check which of the pre-allocated outputs (if applicable) have
# 5.0.2. By calling fn() directly instead of calling the theano
# been reused by the inner function
# function, it is possible that the updates have not been
# performed. Perform the updates if needed.
offset_out = len(output_storage) - 1
if getattr(fn, 'need_update_inputs', True):
# Update the inputs that have an update function
for inp, storage in zip(self.fn.maker.expanded_inputs,
self.fn.input_storage)[::-1]:
if inp.update is not None:
storage.data = output_storage[offset_out].data
offset_out -= 1
# 5.0.3. Check which of the pre-allocated outputs (if applicable)
# have been reused by the inner function
for idx in range(len_output_storage):
for idx in range(len_output_storage):
# If the storage map does not contain the same object, then
# If the storage map does not contain the same object, then
# the pre-allocated output has not been reused
# the pre-allocated output has not been reused
...
@@ -426,8 +438,8 @@ def perform(
...
@@ -426,8 +438,8 @@ def perform(
else:
else:
output_reused[idx] = False
output_reused[idx] = False
#
Check which of the input storage have been modified by the inner
#
5.0.4. Check which of the input storage have been modified by the
# function
#
inner
function
for idx in xrange(len(input_storage)):
for idx in xrange(len(input_storage)):
# If the storage map does not contain the same object, then
# If the storage map does not contain the same object, then
# the pre-allocated output has not been reused
# the pre-allocated output has not been reused
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论