GPU-based CACGMM trainer in CuPy
Project description
GPU-based CACGMM trainer in CuPy
This package adapts the complex angular GMM model and trainer from pb_bss using CuPy for accelerated inference on the GPU.
At the moment, it is meant to be used with the GSS toolkit, but it can also be used as a general CACGMM trainer tool.
Installation
> pip install cupy-cuda102 # modify according to your CUDA version (https://docs.cupy.dev/en/stable/install.html#installing-cupy)
> pip install cacgmm-gpu
Usage
from cacgmm.cacgmm_trainer import CACGMMTrainer
import cupy as cp
source_activity = cp.random.rand(2, 1000)
source_activity = source_activity / cp.sum(initialization, keepdims=True, axis=0)
initialization = cp.repeat(source_activity[None, ...], 513, axis=0) # F x K x T
source_active_mask = cp.repeat(source_activity[None, ...], 513, axis=0)
X = cp.random.rand(4, 1000, 513) # D x T x F
cacGMM = CACGMMTrainer()
cur = cacGMM.fit(
y=X.T,
initialization=initialization,
iterations=10,
source_activity_mask=source_active_mask,
)
affiliation = cur.predict(X.T, source_activity_mask=source_active_mask) #
posterior = affiliation.transpose(1, 2, 0) # K x T x F
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
cacgmm-gpu-0.1.0.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file cacgmm-gpu-0.1.0.tar.gz
.
File metadata
- Download URL: cacgmm-gpu-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9bd054aee8ba9d41c18548ebfb8f64339036dc7f17263f108bbd8f83c93b664 |
|
MD5 | 7dafe3389be30f527addbe62c8387e6b |
|
BLAKE2b-256 | 7b5242563071a5ddd7fd6c845d5d236474f4af13b894313fe26430d00c7948db |
File details
Details for the file cacgmm_gpu-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: cacgmm_gpu-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dacb9476272db674b7029444b9214c6c3d7857e9938cc2cbd31f1c4f3520fb7a |
|
MD5 | fcc2dc1a00193636b19dbc0aa87b8a7b |
|
BLAKE2b-256 | 53a8b3a64fd953fe57b34f0e96d2eebf41151b34d153cb256d02206638929038 |