a
    –¥»a7  ã                   @   s    d dl Z G dd„ de jd�ZdS )é    Nc                   @   s2   e Zd ZdZdd„ Zejd
dd„ƒZddd	„ZdS )ÚNetModifiera
  
    An abstraction class for supporting modifying a generated net.
    Inherited classes should implement the modify_net method where
    related operators are added to the net.

    Example usage:
        modifier = SomeNetModifier(opts)
        modifier(net)
    c                 C   s   d S ©N© )Úselfr   r   ú]/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/caffe2/python/modeling/net_modifier.pyÚ__init__   s    zNetModifier.__init__Nc                 C   s   d S r   r   )r   ÚnetÚinit_netÚgrad_mapÚblob_to_devicer   r   r   Ú
modify_net   s    zNetModifier.modify_netFc                 C   s   | j |||||d� d S )N)r	   r
   r   Úmodify_output_record)r   )r   r   r	   r
   r   r   r   r   r   Ú__call__   s    ûzNetModifier.__call__)NNN)NNNF)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚabcÚabstractmethodr   r   r   r   r   r   r   	   s   
  ÿr   )Ú	metaclass)r   ÚABCMetar   r   r   r   r   Ú<module>   s   