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.4.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for swarms_torch-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9243233d4941f84ab85b2972ccc05e0473566d3b0649bd8e83d06273760cbb2 |
|
MD5 | 9d368465843aa371f768df7f00c42be2 |
|
BLAKE2b-256 | 495b6b5028830721d6677e654c3e12ba97a01a979f79bdbc4f4a99300153dcb0 |