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.2.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for swarms_torch-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 630cac45e4d6bae9622afa15f139cea34f50d14ef938c4db14bf8f1b43c28768 |
|
MD5 | 4386951552333bf544280bd59560ec0c |
|
BLAKE2b-256 | 0d660958e512d838c89a25aefd73dc3e8d3b3239624de713b70d5c8ab816fa26 |