提交 e142a2b7 authored 作者: James Bergstra's avatar James Bergstra

added function.txt to basic tutorial

上级 1857d61d
差异被折叠。
...@@ -30,6 +30,7 @@ Now we're ready for the tour: ...@@ -30,6 +30,7 @@ Now we're ready for the tour:
adding adding
examples examples
function
module module
module_vs_op module_vs_op
randomstreams randomstreams
......
...@@ -110,8 +110,20 @@ class Function(object): ...@@ -110,8 +110,20 @@ class Function(object):
outputs, performs the packing and unpacking of inputs and return values. It implements the outputs, performs the packing and unpacking of inputs and return values. It implements the
square-bracket indexing so that you can look up the value of a symbolic node. square-bracket indexing so that you can look up the value of a symbolic node.
Functions are copyable via {{{fn.copy()}}} and {{{copy.copy(fn)}}}.
When a function is copied, this instance is duplicated. Contrast with self.maker When a function is copied, this instance is duplicated. Contrast with self.maker
(instance of `FunctionMaker`) that is shared between copies. (instance of `FunctionMaker`) that is shared between copies.
The meaning of copying a function is that the containers and their current values will all be duplicated.
This requires that mutable inputs be copied, whereas immutable inputs may be shared between copies.
A Function instance is hashable, on the basis of its memory address (its id).
A Function instance is only equal to itself.
A Function instance may be serialized using the `pickle` or `cPickle` modules.
This will save all default inputs, the graph, and *** to the pickle file (WRITEME).
""" """
......
"""Define `SymbolicInput`, `SymbolicOutput`, `In`, `Out` """
__docformat__ = 'restructuredtext en'
class SymbolicInput(object): class SymbolicInput(object):
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论