Spaces:
Sleeping
Sleeping
File size: 564 Bytes
281df87 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
"""
This is a high-level pseudo code for grounding net.
This class needs to tokenize grounding input into gronding tokens which
will be used in GatedAttenion layers.
class PositionNet(nn.Module):
def __init__(self, **kwargs):
super().__init__()
kwargs should be defined by model.grounding_tokenizer in config yaml file.
def forward(self, **kwargs):
kwargs should be the output of grounding_tokenizer_input network
return grounding_tokens # with shape: Batch * Num_Of_Token* Token_Channel_Dimension
""" |