MCPcopy Create free account
hub / github.com/Hzfinfdu/Diffusion-BERT / __init__

Method __init__

models/modeling_roberta.py:472–476  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

470# Copied from transformers.models.bert.modeling_bert.BertEncoder with Bert->Roberta
471class RobertaEncoder(nn.Module):
472 def __init__(self, config):
473 super().__init__()
474 self.config = config
475 self.layer = nn.ModuleList([RobertaLayer(config) for _ in range(config.num_hidden_layers)])
476 self.gradient_checkpointing = False
477
478 def forward(
479 self,

Callers

nothing calls this directly

Calls 2

RobertaLayerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected