Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
319c279d
Commit
319c279d
authored
Oct 28, 2019
by
Logan Weber
Committed by
Tianqi Chen
Oct 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type var docs (#4208)
parent
dcc6af53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
python/tvm/relay/ty.py
+13
-10
No files found.
python/tvm/relay/ty.py
View file @
319c279d
...
...
@@ -56,8 +56,8 @@ class Type(RelayNode):
class
TensorType
(
Type
):
"""A concrete TensorType in Relay.
This is the type assigned to tensor
's with a known d
ype and shape. For
example a tensor of `float32` and `(5, 5)`.
This is the type assigned to tensor
s with a known dt
ype and shape. For
example
,
a tensor of `float32` and `(5, 5)`.
Parameters
----------
...
...
@@ -119,13 +119,14 @@ class TypeVar(Type):
functions which are generic over types.
"""
def
__init__
(
self
,
var
,
kind
=
Kind
.
Type
):
def
__init__
(
self
,
name_hint
,
kind
=
Kind
.
Type
):
"""Construct a TypeVar.
Parameters
----------
var : tvm.expr.Var
The tvm.Var which backs the type parameter.
name_hint: str
The name of the type variable. This name only acts as a hint, and
is not used for equality.
kind : Optional[Kind]
The kind of the type parameter.
...
...
@@ -136,7 +137,7 @@ class TypeVar(Type):
type_var : tvm.relay.TypeVar
The type variable.
"""
self
.
__init_handle_by_constructor__
(
_make
.
TypeVar
,
var
,
kind
)
self
.
__init_handle_by_constructor__
(
_make
.
TypeVar
,
name_hint
,
kind
)
def
ShapeVar
(
name
):
"""A helper which constructs a type var of which the shape kind.
...
...
@@ -159,13 +160,15 @@ class GlobalTypeVar(Type):
stored in the environment.
"""
def
__init__
(
self
,
var
,
kind
=
Kind
.
AdtHandle
):
def
__init__
(
self
,
name_hint
,
kind
=
Kind
.
AdtHandle
):
"""Construct a GlobalTypeVar.
Parameters
----------
var: tvm.Var
The tvm.Var which backs the type parameter.
name_hint: str
The name of the global type variable. This name only acts as a
hint, and is not used for equality.
kind: Kind, optional
The kind of the type parameter, Kind.AdtHandle by default.
...
...
@@ -174,7 +177,7 @@ class GlobalTypeVar(Type):
type_var: GlobalTypeVar
The global type variable.
"""
self
.
__init_handle_by_constructor__
(
_make
.
GlobalTypeVar
,
var
,
kind
)
self
.
__init_handle_by_constructor__
(
_make
.
GlobalTypeVar
,
name_hint
,
kind
)
@register_relay_node
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment