Create directory if it does not exist
Create path if it does not exist
If Cuda is available, use Cuda device, else use CPU device When choosing from Cuda devices, this function will choose the one with max memory available
x_train's type and the shape of
Read the csv file and returns two separate list containing files name and their labels.
- csv_file_path: Path to the CSV file.
file_names: List containing files names.
file_label: List containing their respective labels.
Compute median height and width of all images in data. These values are used to resize the images at later point. Number of channels do not change from the original images. Currently, only 2-D images are supported.
- data: 2-D Image data with shape N x H x W x C.
median height: Median height of all images in the data.
median width: Median width of all images in the data.
Resize all images in data to size h x w x c, where h is the height, w is the width and c is the number of channels. The number of channels c does not change from data. The function supports only 2-D image data.
data: 2-D Image data with shape N x H x W x C.
h: Image resize height.
w: Image resize width.
- data: Resize data.
Get the current system environment. If the current system is not supported, raise an exception.