lmgvp/modules.py [457:496]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def _step(self, batch, batch_idx, prefix="train"):
        """Forward pass and computation of the loss.

        Args:
            batch: (torch_geometric.data.Data, targets)
            batch_idx: index of current batch
            prefix: Prefix for the loss: XXX_loss (train, validation, test)

        Returns:
            Loss
        """
        x, targets = batch
        logits = self._forward(x)
        loss = self._compute_loss(logits, targets)
        self.log("{}_loss".format(prefix), loss)
        return loss

    def forward(self, batch):
        """Perform the forward pass.

        Args:
            batch: (torch_geometric.data.Data, targets)

        Returns:
            logits
        """
        x, targets = batch
        logits = self._forward(x)
        return logits

    def _forward(self, batch):
        """Helper function to perform the forward pass.

        Args:
            batch: torch_geometric.data.Data

        Returns:
            logits
        """
        edge_index = batch.edge_index
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



lmgvp/modules.py [786:826]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def _step(self, batch, batch_idx, prefix="train"):
        """Forward pass and computation of the loss.

        Args:
            batch: (torch_geometric.data.Data, targets)
            batch_idx: index of current batch
            prefix: Prefix for the loss: XXX_loss (train, validation, test)

        Returns:
            Loss
        """
        x, targets = batch
        logits = self._forward(x)
        loss = self._compute_loss(logits, targets)
        self.log("{}_loss".format(prefix), loss)
        return loss

    def forward(self, batch):
        """Does the forward pass through the model for batch[0]

        Args:
            batch: (torch_geometric.data.Data, targets)

        Returns:
            Inferenced logits
        """
        x, targets = batch
        logits = self._forward(x)
        return logits

    def _forward(self, batch):
        """Does the forward pass through the model for batch

        Args:
            batch: torch_geometric.data.Data

        Returns:
            Inferenced logits

        """
        edge_index = batch.edge_index
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



