graphinvent/Workflow.py
def create_model(self) -> torch.nn.Module:
        """
        Initializes the model to be trained. Possible models are: "MNN", "S2V",
        "AttS2V", "GGNN", "AttGGNN", or "EMN".

        Returns:
        -------
            net (torch.nn.Module) : Neural net model.
        """
        if self.constants.model == "MNN":
            net = gnn.mpnn.MNN(constants=self.constants)
        elif self.constants.model == "S2V":
            net = gnn.mpnn.S2V(constants=self.constants)
        elif self.constants.model == "AttS2V":
            net = gnn.mpnn.AttentionS2V(constants=self.constants)
        elif self.constants.model == "GGNN":
            net = gnn.mpnn.GGNN(constants=self.constants)
        elif self.constants.model == "AttGGNN":
            net = gnn.mpnn.AttentionGGNN(constants=self.constants)
        elif self.constants.model == "EMN":
            net = gnn.mpnn.EMN(constants=self.constants)
        else:
            raise ValueError("Invalid model entered.")

        if self.constants.device == "cuda":
            net = net.to("cuda", non_blocking=True)

        return net

        Initializes the model to be trained. Possible models are: "MNN", "S2V",
        "AttS2V", "GGNN", "AttGGNN", or "EMN".

        Returns:
        -------
            net (torch.nn.Module) : Neural net model.
        
Initializes the model to be trained.
Initializes the model to be trained .
def create_model(self) -> torch.nn.Module:
        if self.constants.model == "MNN":
            net = gnn.mpnn.MNN(constants=self.constants)
        elif self.constants.model == "S2V":
            net = gnn.mpnn.S2V(constants=self.constants)
        elif self.constants.model == "AttS2V":
            net = gnn.mpnn.AttentionS2V(constants=self.constants)
        elif self.constants.model == "GGNN":
            net = gnn.mpnn.GGNN(constants=self.constants)
        elif self.constants.model == "AttGGNN":
            net = gnn.mpnn.AttentionGGNN(constants=self.constants)
        elif self.constants.model == "EMN":
            net = gnn.mpnn.EMN(constants=self.constants)
        else:
            raise ValueError("Invalid model entered.")
        if self.constants.device == "cuda":
            net = net.to("cuda", non_blocking=True)
        return net
def create_model ( self ) -> torch . nn . Module : if self . constants . model == "MNN" : net = gnn . mpnn . MNN ( constants = self . constants ) elif self . constants . model == "S2V" : net = gnn . mpnn . S2V ( constants = self . constants ) elif self . constants . model == "AttS2V" : net = gnn . mpnn . AttentionS2V ( constants = self . constants ) elif self . constants . model == "GGNN" : net = gnn . mpnn . GGNN ( constants = self . constants ) elif self . constants . model == "AttGGNN" : net = gnn . mpnn . AttentionGGNN ( constants = self . constants ) elif self . constants . model == "EMN" : net = gnn . mpnn . EMN ( constants = self . constants ) else : raise ValueError ( "Invalid model entered." ) if self . constants . device == "cuda" : net = net . to ( "cuda" , non_blocking = True ) return net
Initializes the model to be trained.
Initializes the model to be trained .
"""
        Initializes the model to be trained. Possible models are: "MNN", "S2V",
        "AttS2V", "GGNN", "AttGGNN", or "EMN".

        Returns:
        -------
            net (torch.nn.Module) : Neural net model.
        """
net (torch.nn.Module) : Neural net model.
net ( torch . nn . Module ) : Neural net model .
self