Computational_Biolgy/Fout_2017/driver.py
def forward(self, xnr, xer, ijr, xnl, xel, ijl):
        """Forward pass through the network."""
        if not isinstance(xnr, torch.FloatTensor):
            xnr = xnr.float()
        if not isinstance(xer, torch.FloatTensor):
            xer = xer.float()
        if not isinstance(xnl, torch.FloatTensor):
            xnl = xnl.float()
        if not isinstance(xel, torch.FloatTensor):
            xel = xel.float()

        # Ligand conv blocks (Note: could learn/update edge features too)
        xnl = self.conv1(xnl, xel, ijl)
        xnl = self.conv2(xnl, xel, ijl)
        xnl = self.conv3(xnl, xel, ijl)

        # Receptor conv blocks (Note: could learn/update edge features too)
        xnr = self.conv1(xnr, xer, ijr)
        xnr = self.conv2(xnr, xer, ijr)
        xnr = self.conv3(xnr, xer, ijr)

        # Merge rececptor and ligand conv block outputs
        xout = self.dense(self.merge(xnl, xnr))
        return xout
Forward pass through the network.
Forward pass through the network.
Forward pass through the network .
def forward(self, xnr, xer, ijr, xnl, xel, ijl):
        if not isinstance(xnr, torch.FloatTensor):
            xnr = xnr.float()
        if not isinstance(xer, torch.FloatTensor):
            xer = xer.float()
        if not isinstance(xnl, torch.FloatTensor):
            xnl = xnl.float()
        if not isinstance(xel, torch.FloatTensor):
            xel = xel.float()
        xnl = self.conv1(xnl, xel, ijl)
        xnl = self.conv2(xnl, xel, ijl)
        xnl = self.conv3(xnl, xel, ijl)
        xnr = self.conv1(xnr, xer, ijr)
        xnr = self.conv2(xnr, xer, ijr)
        xnr = self.conv3(xnr, xer, ijr)
        xout = self.dense(self.merge(xnl, xnr))
        return xout
def forward ( self , xnr , xer , ijr , xnl , xel , ijl ) : if not isinstance ( xnr , torch . FloatTensor ) : xnr = xnr . float ( ) if not isinstance ( xer , torch . FloatTensor ) : xer = xer . float ( ) if not isinstance ( xnl , torch . FloatTensor ) : xnl = xnl . float ( ) if not isinstance ( xel , torch . FloatTensor ) : xel = xel . float ( ) xnl = self . conv1 ( xnl , xel , ijl ) xnl = self . conv2 ( xnl , xel , ijl ) xnl = self . conv3 ( xnl , xel , ijl ) xnr = self . conv1 ( xnr , xer , ijr ) xnr = self . conv2 ( xnr , xer , ijr ) xnr = self . conv3 ( xnr , xer , ijr ) xout = self . dense ( self . merge ( xnl , xnr ) ) return xout
Forward pass through the network.
Forward pass through the network .
"""Forward pass through the network.""" # Ligand conv blocks (Note: could learn/update edge features too) # Receptor conv blocks (Note: could learn/update edge features too) # Merge rececptor and ligand conv block outputs
self
xnr
xer
ijr
xnl
xel
ijl