tensorly.datasets.synthetic.gen_image

gen_image(region='swiss', image_height=20, image_width=20, n_channels=None, weight_value=1)[source]

Generates an image for regression testing

Parameters:

region : {‘swiss’, ‘rectangle’}

image_height : int, optional

image_width : int, optional

weight_value : float, optional

n_channels : int or None, optional

if not None, the resulting image will have a third dimension

Returns:

ndarray

array of shape (image_height, image_width) or (image_height, image_width, n_channels) array for which all values are zero except the region specified