o
    }oi                     @   s\   d dl mZmZ d dlmZmZmZ d dlmZm	Z	m
Z
mZ dgZG dd dejeeZdS )    )Tensornn)SerializationTyping	typecheck)
LabelsTypeLossType
NeuralTypeRegressionValuesTypeMSELossc                       s`   e Zd ZdZedd Zedd Zddef fdd	Ze	 d
e
de
de
f fddZ  ZS )r   z
    MSELoss
    c                 C   s"   t tdt t tdt dS )z3Returns definitions of module input ports.
        B)predslabels)r	   tupler
   r   self r   [/home/ubuntu/.local/lib/python3.10/site-packages/nemo/collections/common/losses/mse_loss.pyinput_types   s   zMSELoss.input_typesc                 C   s   dt t diS )z4Returns definitions of module output ports.
        loss)elements_type)r	   r   r   r   r   r   output_types%   s   zMSELoss.output_typesmean	reductionc                    s   t  j|d dS )zS
        Args:
            reduction: type of the reduction over the batch
        )r   N)super__init__)r   r   	__class__r   r   r   +   s   zMSELoss.__init__r   r   returnc                    s   t  ||S )zk
        Args:
            preds: output of the classifier
            labels: ground truth labels
        )r   forward)r   r   r   r   r   r   r   2   s   zMSELoss.forward)r   )__name__
__module____qualname____doc__propertyr   r   strr   r   r   r   __classcell__r   r   r   r   r      s    

$N)torchr   r   nemo.core.classesr   r   r   nemo.core.neural_typesr   r   r	   r
   __all__r   r   r   r   r   <module>   s
   