CoolFace
Modelpublic

CLYang617/RemoteSensingChangeDetection-RSCD.HA2F

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
trainer.cpython-39.pyc10 linesDownload Raw Back to __pycache__
1a

2�#h��@sNddlZddlmZddlmZddlmZddlmZGdd�dej	�Z3dS)�N)�Encoder)�Decoder)�weight_initcs&eZdZd�fdd�	Zdd�Z�ZS)�Trainer�smallcs^t���|dkrd}n|dkr&d}nds2Jd��t|�|_tddd	|gd4�|_t|j�dS)NZtiny��ri�Fz!Trainer: check the vit model type�@��)Zin_dim)�super�__init__r�encoderr�decoderr)�self�5model_typeZ	embed_dim��	__class__��6C:\Users\82607\Desktop\code\ChangeViT\model\trainer.pyrs67zTrainer.__init__cCs |�||�\}}|�||�}|S)N)r
r)r�x�yZfxZfy�predrrr�forwardszTrainer.forward)r)�__name__�8__module__�__qualname__rr�
__classcell__rrrrr9sr)�torch�torch.nn�nnZ
model.encoderrZ
model.decoderr�model.utilsrZModulerrrrr�<module>s10