finished a first pass at digesting the paper, start with transformer
This commit is contained in:
parent
e0dd4cfeaa
commit
8ebb8a9661
@ -1,8 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
from functools import partial
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
from torch.nn import Module, ModuleList, RMSNorm, Identity
|
||||
from torch.nn import Module, ModuleList, Linear, RMSNorm, Identity
|
||||
from torch import cat, stack, tensor, Tensor, is_tensor
|
||||
|
||||
# ein related
|
||||
|
||||
from einops import einsum, rearrange, repeat, reduce
|
||||
from einops.layers.torch import Rearrange
|
||||
|
||||
# constants
|
||||
|
||||
LinearNoBias = partial(Linear, bias = False)
|
||||
|
||||
# helpers
|
||||
|
||||
def exists(v):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user