Skip to content

Instantly share code, notes, and snippets.

View mesolimbo's full-sized avatar
🤓
Nerding

Al mesolimbo

🤓
Nerding
View GitHub Profile
@mesolimbo
mesolimbo / deaptorch.py
Created November 24, 2024 05:10
A tiny experiment to combine DEAP and PyTorch to evaluate a genetic algorith via GPU
# Install CUDA compatible PyTorch: https://pytorch.org/get-started/locally/
#
# pipenv run pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
# You'll also need: pipenv run pip3 install deap transformers
import random
import torch
import sys
from deap import base, creator, tools