You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

org_resnet.py 396B

123456789101112131415
  1. from typing import Dict
  2. import torch
  3. from ..tv_resnet import BasicBlock, ResNet
  4. class RSNAORGResNet18(ResNet):
  5. def __init__(self):
  6. super().__init__(BasicBlock, [2, 2, 2, 2], binary=True)
  7. def forward(self, x: torch.Tensor, y: torch.Tensor = None) -> Dict[str, torch.Tensor]:
  8. x = x.repeat_interleave(3, dim=1) # B 3 224 224
  9. return super().forward(x, y)