mirror of
https://github.com/karpathy/minGPT
synced 2024-05-17 21:16:05 +02:00
ummm eyeroll
This commit is contained in:
parent
2f3400f42a
commit
2e979dde5f
|
@ -100,8 +100,8 @@ class Block(nn.Module):
|
|||
class GPT(nn.Module):
|
||||
""" GPT Language Model """
|
||||
|
||||
@classmethod
|
||||
def get_default_config(cls):
|
||||
@staticmethod
|
||||
def get_default_config():
|
||||
C = CN()
|
||||
# either model_type or (n_layer, n_head, n_embd) must be given in the config
|
||||
C.model_type = 'gpt'
|
||||
|
|
|
@ -12,8 +12,8 @@ from mingpt.utils import CfgNode as CN
|
|||
|
||||
class Trainer:
|
||||
|
||||
@classmethod
|
||||
def get_default_config(cls):
|
||||
@staticmethod
|
||||
def get_default_config():
|
||||
C = CN()
|
||||
# device to train on
|
||||
C.device = 'auto'
|
||||
|
|
|
@ -65,8 +65,8 @@ class AdditionDataset(Dataset):
|
|||
correctly.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def get_default_config(cls):
|
||||
@staticmethod
|
||||
def get_default_config():
|
||||
C = CN()
|
||||
C.ndigit = 2
|
||||
return C
|
||||
|
|
|
@ -44,8 +44,8 @@ class CharDataset(Dataset):
|
|||
Emits batches of characters
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def get_default_config(cls):
|
||||
@staticmethod
|
||||
def get_default_config():
|
||||
C = CN()
|
||||
C.block_size = 128
|
||||
return C
|
||||
|
|
Loading…
Reference in New Issue