Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created July 19, 2023 07:06
Show Gist options
  • Save quantra-go-algo/fb045fb9c58f382e3a3368962034b53a to your computer and use it in GitHub Desktop.
Save quantra-go-algo/fb045fb9c58f382e3a3368962034b53a to your computer and use it in GitHub Desktop.
# We create image data for train and test purposes with the following inputs
num_train_samples = 1000
num_test_samples = 200
image_width = 128
image_height = 128
channels = 1 # Grayscale image (single channel)
num_classes = 2 # Binary classification (two classes)
# Generate random training and test data for demonstration
X_train = np.random.random((num_train_samples, image_width, image_height, channels))
y_train = np.random.randint(low=0, high=num_classes, size=num_train_samples)
X_test = np.random.random((num_test_samples, image_width, image_height, channels))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment