MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / shape_factor

Method shape_factor

monai/networks/nets/segresnet_ds.py:387–395  ·  view source on GitHub ↗

Calculate the factors (divisors) that the input image shape must be divisible by

(self)

Source from the content-addressed store, hash-verified

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 """

Callers 3

is_valid_shapeMethod · 0.95
_forwardMethod · 0.95
forwardMethod · 0.80

Calls 1

arrayMethod · 0.80

Tested by

no test coverage detected