← 开源
subhadarship

kmeans_pytorch

kmeans using PyTorch

Model DevelopmentClassical MLJupyter Notebook
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
543
Star
84
Fork
+1
本周
3
贡献者
创建于 2019-12-25 · 更新于 2026-10-14 · 今日第 17376 名
主要开发者
subhadarshipsprenkampwooohoooo

subhadarship/kmeans_pytorch 排名第 17,376,有 543 个星标。

同类别比较

subhadarship/kmeans_pytorch 排名第 17,376,此处有 8 个同类条目;soroushmehr/sampleRNN_ICLR2017 排名第 17,375。

同类别比较
名称排名指标
menyifang/En3D17,370
语言:
Python
星标数:
543
分叉数:
44
简介:
Official implementation of "En3D: An Enhanced Generative Model for Sculpting 3D Humans from 2D Synthetic Data", CVPR 2024; 3D Avatar Generation and Animation
microsoft/StyleSwin17,371
语言:
Python
星标数:
543
分叉数:
53
简介:
[CVPR 2022] StyleSwin: Transformer-based GAN for High-resolution Image Generation
milleniums/High-Resolution-Remote-Sensing-Semantic-Segmentation-PyTorch17,372
语言:
Python
星标数:
543
分叉数:
86
简介:
PyTorch实现高分遥感语义分割(地物分类)
soroushmehr/sampleRNN_ICLR201717,375
语言:
Python
星标数:
543
分叉数:
139
简介:
SampleRNN: An Unconditional End-to-End Neural Audio Generation Model
ternaus/TernausNetV217,377
语言:
Jupyter Notebook
星标数:
543
分叉数:
110
简介:
TernausNetV2: Fully Convolutional Network for Instance Segmentation
qjadud1994/CRNN-Keras17,390
语言:
Python
星标数:
542
分叉数:
188
简介:
CRNN (CNN+RNN) for OCR using Keras / License Plate Recognition
BoyuanJiang/Age-Gender-Estimate-TF17,398
语言:
Python
星标数:
541
分叉数:
158
简介:
Face age and gender estimate using TensorFlow
LarryJane491/Lora-Training-in-Comfy17,399
语言:
Python
星标数:
541
分叉数:
78
简介:
This custom node lets you train LoRA directly in ComfyUI!
关键参数与规格
关键参数与规格
参数值
语言Jupyter Notebook
类别Model Development
子类别Classical ML
星标数543
分叉数84
贡献者3
创建日期2019-12-25
更新日期2026-10-14
1 天星标数0
7 天星标数1
排名17,376
上次排名6,961
排名变化-10,415
7 天星标排名11,415
上次 7 天星标排名11,479
7 天星标排名变化64
总星标排名18,175
上次总星标排名18,125
总星标排名变化-50
国家USA
README 摘录

K Means using PyTorch PyTorch implementation of kmeans for utilizing GPU Getting Started see for a more elaborate example Requirements PyTorch version >= 1. 6 Installation install with : **Installing from source** To install from source and develop locally: CPU vs GPU see for a comparison between CPU and GPU Notes useful when clustering large number of samples utilizes GPU for faster matrix computations support euclidean and cosine distances (for now) Credits This implementation closely follows the style of this Documentation is

done using the awesome theme jekyllbook License MIT

常见问题

记录了多少星标和分叉?

subhadarship/kmeans_pytorch 有 543 个星标和 84 个分叉。

仓库排名是多少?

subhadarship/kmeans_pytorch 排名第 17,376。

记录的语言和类别是什么?

subhadarship/kmeans_pytorch 有 543 个星标,语言为 Jupyter Notebook,类别为 Model Development。

哪个仓库排名最接近?

subhadarship/kmeans_pytorch 与 soroushmehr/sampleRNN_ICLR2017 比较,后者排名第 17,375,有 543 个星标。

README

K Means using PyTorch

PyTorch implementation of kmeans for utilizing GPU

Getting Started


import torch
import numpy as np
from kmeans_pytorch import kmeans

# data
data_size, dims, num_clusters = 1000, 2, 3
x = np.random.randn(data_size, dims) / 6
x = torch.from_numpy(x)

# kmeans
cluster_ids_x, cluster_centers = kmeans(
    X=x, num_clusters=num_clusters, distance='euclidean', device=torch.device('cuda:0')
)

see example.ipynb for a more elaborate example

Requirements

  • PyTorch version >= 1.0.0
  • Python version >= 3.6

Installation

install with pip:

pip install kmeans-pytorch

Installing from source

To install from source and develop locally:

git clone https://github.com/subhadarship/kmeans_pytorch
cd kmeans_pytorch
pip install --editable .

CPU vs GPU

see cpu_vs_gpu.ipynb for a comparison between CPU and GPU

Notes

  • useful when clustering large number of samples
  • utilizes GPU for faster matrix computations
  • support euclidean and cosine distances (for now)

Credits

  • This implementation closely follows the style of this
  • Documentation is done using the awesome theme jekyllbook

License

MIT

排名相邻
同类项目