MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / __init__

Method __init__

examples/diffusion/python_stable_diffusion_3/other_impls.py:502–506  ·  view source on GitHub ↗
(self, config_dict, dtype, device)

Source from the content-addressed store, hash-verified

500
501class T5(torch.nn.Module):
502 def __init__(self, config_dict, dtype, device):
503 super().__init__()
504 self.num_layers = config_dict["num_layers"]
505 self.encoder = T5Stack(self.num_layers, config_dict["d_model"], config_dict["d_model"], config_dict["d_ff"], config_dict["num_heads"], config_dict["vocab_size"], dtype, device)
506 self.dtype = dtype
507
508 def get_input_embeddings(self):
509 return self.encoder.embed_tokens

Callers 15

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

T5StackClass · 0.85

Tested by

no test coverage detected