Skip to content

ode_transformer.py: Add missing colon on line 330 #3

Open
@wushuangX

Description

@wushuangX
        self.calculate_num = args.enc_calculate_num
        self.rk_type = args.rk_type
         
        if self.calculate_num == 2 and self.rk_type == "learnable":
            # RK2-learnable
            self.gate_linear = Linear(2 * embed_dim, 1)
        elif self.calculate_num == 2 and self.rk_type == "initialization"
            self.alpha = torch.nn.Parameter(torch.Tensor(self.calculate_num))
            self.alpha.data.fill_(1)
        else:
            raise ValueError("invalid rk_type!")

        self.use_word_dropout = args.use_word_dropout
        self.word_dropout = args.word_dropout

I'm currently learning from your ODE transformer implementation, and I believe there might be a missing colon on line 330 of fairseq/models/ode_transformer.py. This co//uld potentially lead to an error during execution.

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