Skip to content

Commit 493b535

Browse files
committed
go top down
1 parent 31cb371 commit 493b535

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

HRM/hrm.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import torch
2+
from torch.nn import Module, ModuleList
3+
4+
from einops import rearrange
5+
6+
# helper functions
7+
8+
def exists(v):
9+
return v is not None
10+
11+
def default(v, d):
12+
return v if exists(v) else d
13+
14+
# modules
15+
16+
class Input(Module):
17+
def __init__(self):
18+
super().__init__()
19+
20+
class SlowHighLevelRecurrent(Module):
21+
def __init__(self):
22+
super().__init__()
23+
24+
class FastLowLevelRecurrent(Module):
25+
def __init__(self):
26+
super().__init__()
27+
28+
class Output(Module):
29+
def __init__(self):
30+
super().__init__()

0 commit comments

Comments
 (0)