human
Give me a the Python code you requested given the following:
I am working on the file "Seminar3/HW3_Modules.ipynb".
The first task is:
The MSECriterion, which is basic L2 norm usually used for regression, is implemented here for you.
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class MSECriterion(Criterion):
    def __init__(self):
        super(MSECriterion, self).__init__()
        
    def updateOutput(self, input, target):   
        self.output = np.sum(np.power(input - target,2)) / input.shape[0]
        return self.output 
 
    def updateGradInput(self, input, target):
        self.gradInput  = (input - target) * 2 / input.shape[0]
        return self.gradInput

    def __repr__(self):
        return "MSECriterion"