Skip to content

Why Segment Embedding number only 3? #106

Open
@UTimeStrange

Description

@UTimeStrange
import torch.nn as nn
class SegmentEmbedding(nn.Embedding):  
        def __init__(self, embed_size=512):  
                   super().__init__(3, embed_size, padding_idx=0)  

This is the source code. First idx is padding, thus only 2 segment is supported. Why does Bert support 2 segments only?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions