(resolution)
| 155 | |
| 156 | |
| 157 | def coerce_resolution(resolution): |
| 158 | if isinstance(resolution, int): |
| 159 | resolution = [resolution, resolution] # H, W |
| 160 | elif isinstance(resolution, (tuple, list)): |
| 161 | resolution = list(resolution) |
| 162 | else: |
| 163 | raise ValueError("Unknown type of resolution:", resolution) |
| 164 | return resolution |
| 165 | |
| 166 | |
| 167 | # done vqvae model |
no outgoing calls
no test coverage detected