(img_size)
| 84 | |
| 85 | |
| 86 | def AutoEncoder(img_size): |
| 87 | assert isinstance(img_size, tuple), f"img_size should be tuple, but got {type(img_size)}" |
| 88 | if img_size == (1, 28, 28): |
| 89 | return AutoEncoder1x28x28() |
| 90 | elif img_size == (3, 32, 32): |
| 91 | return AutoEncoder3x32x32() |
| 92 | else: |
| 93 | raise NotImplementedError("Unsupported img size!") |
| 94 | |
| 95 | |
| 96 | if __name__=='__main__': |
no test coverage detected