Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9cdbcdb4
提交
9cdbcdb4
authored
4月 24, 2015
作者:
serdyuk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added dump/load into library documentation
FLAKE8
上级
16acde8e
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
29 行增加
和
4 行删除
+29
-4
index.txt
doc/library/index.txt
+1
-0
pkl_utils.txt
doc/library/misc/pkl_utils.txt
+16
-0
loading_and_saving.txt
doc/tutorial/loading_and_saving.txt
+12
-3
test_pkl_utils.py
theano/misc/tests/test_pkl_utils.py
+0
-1
没有找到文件。
doc/library/index.txt
浏览文件 @
9cdbcdb4
...
@@ -20,6 +20,7 @@ Types and Ops that you can use to build and compile expression graphs.
...
@@ -20,6 +20,7 @@ Types and Ops that you can use to build and compile expression graphs.
sparse/sandbox
sparse/sandbox
scalar/index
scalar/index
gof/index
gof/index
misc/pkl_utils
scan
scan
sandbox/index
sandbox/index
typed_list
typed_list
...
...
doc/library/misc/pkl_utils.txt
0 → 100644
浏览文件 @
9cdbcdb4
.. _libdoc_misc:
================================================
:mod:`misc.pkl_utils` - Tools for serialization.
================================================
.. autofunction:: theano.misc.pkl_utils.dump
.. autofunction:: theano.misc.pkl_utils.load
.. seealso::
:ref:`tutorial_loadsave`
doc/tutorial/loading_and_saving.txt
浏览文件 @
9cdbcdb4
...
@@ -118,9 +118,18 @@ Robust Serialization
...
@@ -118,9 +118,18 @@ Robust Serialization
====================
====================
This type of serialization internally uses pickling but extracts values of all
This type of serialization internally uses pickling but extracts values of all
shared variables and saves it as numpy arrays. So it may be very hard to
arrays (`CudaNdarray`, `ndarray`) and saves it as numpy arrays. So it may be
deserialize objects on a different version of Theano. It is useful when you
very hard to deserialize objects on a different version of Theano.
would like to resume an experiment on a different kind of hardware.
But tt is useful when you would like to resume an experiment on a different
kind of hardware.
Another use case of this type of serialization is to use parameters for another
model after pretraining, fixing bugs or minor changes in it. You can still
load the parameters manually with `numpy`:
.. code-block:: python
numpy.load('model.zip')
.. autofunction:: theano.misc.pkl_utils.dump
.. autofunction:: theano.misc.pkl_utils.dump
...
...
theano/misc/tests/test_pkl_utils.py
浏览文件 @
9cdbcdb4
...
@@ -36,4 +36,3 @@ def test_dump_load_mrg():
...
@@ -36,4 +36,3 @@ def test_dump_load_mrg():
rng
=
load
(
f
)
rng
=
load
(
f
)
assert
type
(
rng
)
==
MRG_RandomStreams
assert
type
(
rng
)
==
MRG_RandomStreams
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论