Calculate the factors (divisors) that the input image shape must be divisible by
(self)
| 385 | self.up_layers.append(level) |
| 386 | |
| 387 | def shape_factor(self): |
| 388 | """ |
| 389 | Calculate the factors (divisors) that the input image shape must be divisible by |
| 390 | """ |
| 391 | if self.anisotropic_scales is None: |
| 392 | d = [2 ** (len(self.blocks_down) - 1)] * self.spatial_dims |
| 393 | else: |
| 394 | d = list(np.prod(np.array(self.anisotropic_scales[:-1]), axis=0)) |
| 395 | return d |
| 396 | |
| 397 | def is_valid_shape(self, x): |
| 398 | """ |
no test coverage detected