project5_machine_learning/machinelearning/models.py
def run(self, x):
        """
        Runs the model for a batch of examples.

        Your model should predict a node with shape (batch_size x 10),
        containing scores. Higher scores correspond to greater probability of
        the image belonging to a particular class.

        Inputs:
            x: a node with shape (batch_size x 784)
        Output:
            A node with shape (batch_size x 10) containing predicted scores
                (also called logits)
        """
        "*** YOUR CODE HERE ***"
        layer1 = nn.ReLU(nn.AddBias(nn.Linear(x, self.w1), self.b1))
        layer2 = nn.ReLU(nn.AddBias(nn.Linear(layer1, self.w2), self.b2))
        layer3 = nn.AddBias(nn.Linear(layer2, self.w3), self.b3)
        # layer4 = nn.AddBias(nn.Linear(layer3, self.w4), self.b4)
        return layer3

        Runs the model for a batch of examples.

        Your model should predict a node with shape (batch_size x 10),
        containing scores. Higher scores correspond to greater probability of
        the image belonging to a particular class.

        Inputs:
            x: a node with shape (batch_size x 784)
        Output:
            A node with shape (batch_size x 10) containing predicted scores
                (also called logits)
        
Runs the model for a batch of examples.
Your model should predict a node with shape (batch_size x 10),
containing scores. Higher scores correspond to greater probability of
the image belonging to a particular class.

a node with shape (batch_size x 784)
Output:
A node with shape (batch_size x 10) containing predicted scores
(also called logits)
Runs the model for a batch of examples . Your model should predict a node with shape ( batch_size x 10 ) containing scores . Higher scores correspond to greater probability of the image belonging to a particular class . a node with shape ( batch_size x 784 ) Output : A node with shape ( batch_size x 10 ) containing predicted scores ( also called logits )
def run(self, x):
        layer1 = nn.ReLU(nn.AddBias(nn.Linear(x, self.w1), self.b1))
        layer2 = nn.ReLU(nn.AddBias(nn.Linear(layer1, self.w2), self.b2))
        layer3 = nn.AddBias(nn.Linear(layer2, self.w3), self.b3)
        return layer3
def run ( self , x ) : "*** YOUR CODE HERE ***" layer1 = nn . ReLU ( nn . AddBias ( nn . Linear ( x , self . w1 ) , self . b1 ) ) layer2 = nn . ReLU ( nn . AddBias ( nn . Linear ( layer1 , self . w2 ) , self . b2 ) ) layer3 = nn . AddBias ( nn . Linear ( layer2 , self . w3 ) , self . b3 ) return layer3
Runs the model for a batch of examples.
Runs the model for a batch of examples .
"""
        Runs the model for a batch of examples.

        Your model should predict a node with shape (batch_size x 10),
        containing scores. Higher scores correspond to greater probability of
        the image belonging to a particular class.

        Inputs:
            x: a node with shape (batch_size x 784)
        Output:
            A node with shape (batch_size x 10) containing predicted scores
                (also called logits)
        """ "*** YOUR CODE HERE ***" # layer4 = nn.AddBias(nn.Linear(layer3, self.w4), self.b4)
self
x