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_heightint, optional
- image_widthint, optional
- weight_valuefloat, optional
- n_channelsint 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