def _get_target_shape(self, image_path=None):
    ' Get Target Shape\n\n        Get the network target shape from the image shape.\n\n        Parameters\n        ----------\n        image_path : str, optional\n            Path to image file\n\n        '
    if (isinstance(self._image_shape, type(None)) and image_path):
        file = self._format(image_path, os.listdir(image_path)[0])
        self._image_shape = self._get_image_shape(file)
    self._target_size = self._image_shape[:2]
Get Target Shape

Get the network target shape from the image shape.

Parameters
----------
image_path : str, optional
    Path to image file
def _get_target_shape(self, image_path=None):
    ' Get Target Shape\n\n        Get the network target shape from the image shape.\n\n        Parameters\n        ----------\n        image_path : str, optional\n            Path to image file\n\n        '
    if (isinstance(self._image_shape, type(None)) and image_path):
        file = self._format(image_path, os.listdir(image_path)[0])
        self._image_shape = self._get_image_shape(file)
    self._target_size = self._image_shape[:2]