提交 c72934ba authored 作者: james@crane's avatar james@crane

maybe code blocks are like this...

上级 579a4c49
...@@ -264,17 +264,17 @@ class Type(object2, PureType, CLinkerType): ...@@ -264,17 +264,17 @@ class Type(object2, PureType, CLinkerType):
c = tensor.fvector() c = tensor.fvector()
Whenever you create a symbolic variable in theano (technically, `Result`) it will contain Whenever you create a symbolic variable in theano (technically, `Result`) it will contain a
a reference to a Type instance. That reference is typically constant during the lifetime reference to a Type instance. That reference is typically constant during the lifetime of
of the Result. Many variables can refer to a single Type instance, as do b and c above. the Result. Many variables can refer to a single Type instance, as do b and c above. The
The Type instance defines the kind of value which might end up in that variable when Type instance defines the kind of value which might end up in that variable when executing
executing a `Function`. In this sense, theano is like a strongly-typed language because a `Function`. In this sense, theano is like a strongly-typed language because the types
the types are included in the graph before the values. In our example above, b is a are included in the graph before the values. In our example above, b is a Result which is
Result which is guaranteed to corresond to a numpy.ndarray of rank 1 when we try to do guaranteed to corresond to a numpy.ndarray of rank 1 when we try to do some computations
some computations with it. with it.
Many `Op` instances will raise an exception if they are applied to inputs with incorrect Many `Op` instances will raise an exception if they are applied to inputs with incorrect
types. Type references are also useful to do type-checking in pattern-based optimizations. types. Type references are also useful to do type-checking in pattern-based optimizations.
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论