From 66235d1c37d8d4defd0abb68c517d4bb80172423 Mon Sep 17 00:00:00 2001 From: miheer vaidya Date: Wed, 4 Sep 2019 22:24:00 -0600 Subject: [PATCH] Reveal hidden code snippets by inserting newline (#3892) --- docs/langref/relay_type.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/langref/relay_type.rst b/docs/langref/relay_type.rst index 7c2497d..d54ea08 100644 --- a/docs/langref/relay_type.rst +++ b/docs/langref/relay_type.rst @@ -102,6 +102,7 @@ For example, in the below code, :code:`%t` is of type and :code:`%c` is of type :code:`Tensor[(10, 10), float32]`. .. code-block:: python + let %t = (False, Constant(1, (10, 10), float32)); let %c = %t.1; %c @@ -195,6 +196,7 @@ to hold, if such values exist. For example we can define an identity relation to be: .. code-block:: prolog + Identity(I, I) :- true It is usually convenient to type operators @@ -203,6 +205,7 @@ encodes all the necessary constraints on the argument types and the return type. For example, we can define the relation for :code:`flatten`: .. code-block:: prolog + Flatten(Tensor(sh, bt), O) :- O = Tensor(sh[0], prod(sh[1:])) @@ -210,6 +213,7 @@ If we have a relation like :code:`Broadcast` it becomes possible to type operators like :code:`add`: .. code-block:: python + add : fn(t1, t2) -> t3 where Broadcast -- 2.7.4