代码拉取完成,页面将自动刷新
class GPT2Config(object):
def __init__(
self,
vocab_size_or_config_json_file=12491,
n_positions=1024,
n_ctx=512,
n_embd=768,
n_layer=6,
n_head=6,
layer_norm_epsilon=1e-5,
initializer_range=0.02,
):
self.vocab_size = vocab_size_or_config_json_file
self.n_ctx = n_ctx
self.n_positions = n_positions
self.n_embd = n_embd
self.n_layer = n_layer
self.n_head = n_head
self.layer_norm_epsilon = layer_norm_epsilon
self.initializer_range = initializer_range
class TransformerConfig(object):
def __init__(
self,
d_model=768,
n_layers=12,
heads=12,
dropout=0.0,
load_weights='weights'
):
self.d_model = d_model
self.n_layers = n_layers
self.heads = heads
self.dropout = dropout
self.load_weights = load_weights
class GPT2Config(object):
def __init__(
self,
vocab_size_or_config_json_file=12491,
n_positions=1024,
n_ctx=1024,
n_embd=768,
n_layer=12,
n_head=12,
layer_norm_epsilon=1e-5,
initializer_range=0.02,
):
self.vocab_size = vocab_size_or_config_json_file
self.n_ctx = n_ctx
self.n_positions = n_positions
self.n_embd = n_embd
self.n_layer = n_layer
self.n_head = n_head
self.layer_norm_epsilon = layer_norm_epsilon
self.initializer_range = initializer_range
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。