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
8f0bc75f
Commit
8f0bc75f
authored
Mar 27, 2019
by
雾雨魔理沙
Committed by
Tianqi Chen
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Relay] clean up hd, change tl (#2917)
parent
dfe4c466
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
python/tvm/relay/prelude.py
+1
-3
No files found.
python/tvm/relay/prelude.py
View file @
8f0bc75f
...
@@ -29,7 +29,6 @@ class Prelude:
...
@@ -29,7 +29,6 @@ class Prelude:
x
=
Var
(
"x"
,
self
.
l
(
a
))
x
=
Var
(
"x"
,
self
.
l
(
a
))
y
=
Var
(
"y"
)
y
=
Var
(
"y"
)
z
=
Var
(
"z"
)
z
=
Var
(
"z"
)
# Don't match nil() since it will break type checking
cons_case
=
Clause
(
PatternConstructor
(
self
.
cons
,
[
PatternVar
(
y
),
PatternVar
(
z
)]),
y
)
cons_case
=
Clause
(
PatternConstructor
(
self
.
cons
,
[
PatternVar
(
y
),
PatternVar
(
z
)]),
y
)
self
.
mod
[
self
.
hd
]
=
Function
([
x
],
Match
(
x
,
[
cons_case
]),
a
,
[
a
])
self
.
mod
[
self
.
hd
]
=
Function
([
x
],
Match
(
x
,
[
cons_case
]),
a
,
[
a
])
...
@@ -43,9 +42,8 @@ class Prelude:
...
@@ -43,9 +42,8 @@ class Prelude:
x
=
Var
(
"x"
,
self
.
l
(
a
))
x
=
Var
(
"x"
,
self
.
l
(
a
))
y
=
Var
(
"y"
)
y
=
Var
(
"y"
)
z
=
Var
(
"z"
)
z
=
Var
(
"z"
)
nil_case
=
Clause
(
PatternConstructor
(
self
.
nil
,
[]),
self
.
nil
())
cons_case
=
Clause
(
PatternConstructor
(
self
.
cons
,
[
PatternVar
(
y
),
PatternVar
(
z
)]),
z
)
cons_case
=
Clause
(
PatternConstructor
(
self
.
cons
,
[
PatternVar
(
y
),
PatternVar
(
z
)]),
z
)
self
.
mod
[
self
.
tl
]
=
Function
([
x
],
Match
(
x
,
[
nil_case
,
cons_case
]),
self
.
l
(
a
),
[
a
])
self
.
mod
[
self
.
tl
]
=
Function
([
x
],
Match
(
x
,
[
cons_case
]),
self
.
l
(
a
),
[
a
])
def
define_list_nth
(
self
):
def
define_list_nth
(
self
):
"""Defines a function to get the nth element of a list.
"""Defines a function to get the nth element of a list.
...
...
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