a
    h                     @   sV   d dl mZ d dlmZ d dlmZmZ d dlmZ	 ddl
mZ G dd dejZd	S )
    )OrderedDict)Optional)nnTensor)
functional   )_log_api_usage_oncec                       sR   e Zd ZdgZd	ejejeej dd fddZee	e
ef dddZ  ZS )
_SimpleSegmentationModelaux_classifierN)backbone
classifierr
   returnc                    s(   t    t|  || _|| _|| _d S )N)super__init__r   r   r   r
   )selfr   r   r
   	__class__ T/var/www/auris/lib/python3.9/site-packages/torchvision/models/segmentation/_utils.pyr      s
    
z!_SimpleSegmentationModel.__init__)xr   c                 C   s   |j dd  }| |}t }|d }| |}tj||ddd}||d< | jd ur|d }| |}tj||ddd}||d< |S )NoutZbilinearF)sizemodeZalign_cornersZaux)shaper   r   r   FZinterpolater
   )r   r   Zinput_shapefeaturesresultr   r   r   forward   s    



z _SimpleSegmentationModel.forward)N)__name__
__module____qualname__Z__constants__r   Moduler   r   r   dictstrr   __classcell__r   r   r   r   r	   
   s   $r	   N)collectionsr   typingr   Ztorchr   r   Ztorch.nnr   r   utilsr   r"   r	   r   r   r   r   <module>   s
   