sanjanatule commited on
Commit
589bb92
1 Parent(s): dcfc32f

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -0
utils.py CHANGED
@@ -3,6 +3,9 @@ from torch import nn
3
  import lightning.pytorch as pl
4
  from torch.nn import functional as F
5
 
 
 
 
6
  class Head(nn.Module):
7
  """ one head of self-attention """
8
 
 
3
  import lightning.pytorch as pl
4
  from torch.nn import functional as F
5
 
6
+ chars = ['\n', ' ', '!', '$', '&', "'", ',', '-', '.', '3', ':', ';', '?', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
7
+ vocab_size = len(chars)
8
+
9
  class Head(nn.Module):
10
  """ one head of self-attention """
11