swarms-torch - Pytorch
Project description
Swarms in Torch
Swarming algorithms like PSO, Ant Colony, Sakana, and more in PyTorch primitives😊
Installation
You can install the package using pip
pip3 install swarms-torch
Usage
- We have just PSO now, but we're adding in ant colony and others!
from swarms_torch import ParticleSwarmOptimization
#test
pso = ParticleSwarmOptimization(goal="Attention is all you need", n_particles=100)
pso.optimize(iterations=1000)
- Ant Colony Optimization
from swarms_torch.ant_colony_swarm import AntColonyOptimization
# Usage:
goal_string = "Hello ACO"
aco = AntColonyOptimization(goal_string, num_iterations=1000)
best_solution = aco.optimize()
print("Best Matched String:", best_solution)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swarms_torch-0.0.3.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for swarms_torch-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ec2acdda12cf2e31177755c060f0c3b4367d9ce73436e1b236672133574c7e |
|
MD5 | 2ee43ed50395e1c079f3737a9e7ff84f |
|
BLAKE2b-256 | 2b7b44d7914bd5aee5004a4a02f2d3ca1ca3bc009eb837017c7d0b4c6ed23500 |