One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| import torch | |
| from torchvision import datasets | |
| class ImageFolderWithPaths(datasets.ImageFolder): | |
| """Custom dataset that includes image file paths. Extends | |
| torchvision.datasets.ImageFolder | |
| """ | |
| # override the __getitem__ method. this is the method that dataloader calls | |
| def __getitem__(self, index): |
| import numpy as np | |
| import tensorflow as tf | |
| from sklearn.datasets import make_blobs | |
| # Set random seed (for reproducibility) | |
| np.random.seed(1000) | |
| # Create dataset | |
| nb_samples=2000 |