12、均移聚类(Mean shift clustering)

In this lesson, we start by discussing the CLIP Interrogator, a Hugging Face Spaces Gradio app that generates text prompts for creating CLIP embeddings. We then dive back into matrix multiplication, using Einstein summation notation and torch.einsum to simplify code and improve performance. We explore GPU acceleration with CUDA and Numba, demonstrating how to write a kernel function for matrix multiplication and launch it on the GPU.

Next up we exercise our tensor programming skills by implementing mean shift clustering, a technique for identifying clusters within a dataset. We create synthetic data, explain the mean shift algorithm, and introduce the Gaussian kernel for penalizing distant points. We implement the mean shift clustering algorithm using PyTorch and discuss the importance of tensor manipulation operations for efficient GPU programming.

Finally, we optimize the mean shift algorithm using PyTorch and GPUs, demonstrating how to calculate weights, multiply matrices, and sum up points to obtain new data points. We explore the impact of changing batch sizes on performance and encourage viewers to research other clustering algorithms.

The lesson concludes with an introduction to calculus, focusing on derivatives and the calculus of infinitesimals.

Concepts discussed

  • CLIP Interrogator
  • Inverse problems
  • Matrix multiplication
  • Einstein summation notation and torch.einsum
  • GPU acceleration and CUDA
  • Numba
  • Mean shift clustering
  • Gaussian kernel
  • Norms
  • Euclidean distance
  • Calculus
    • Derivatives and Infinitesimals

Video

Lesson resources

相关推荐

  1. 12(Mean shift clustering)

    2024-05-16 11:08:13       35 阅读
  2. Phenograph方法

    2024-05-16 11:08:13       57 阅读
  3. KMean

    2024-05-16 11:08:13       55 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-16 11:08:13       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-16 11:08:13       101 阅读
  3. 在Django里面运行非项目文件

    2024-05-16 11:08:13       82 阅读
  4. Python语言-面向对象

    2024-05-16 11:08:13       91 阅读

热门阅读

  1. JUnit 4单元测试常用注解和方法

    2024-05-16 11:08:13       31 阅读
  2. Git实用命令

    2024-05-16 11:08:13       34 阅读
  3. 在 CentOS 上使用 Nginx 配置 HTTPS 并禁止 IP 访问

    2024-05-16 11:08:13       30 阅读
  4. 【奈学科技】P7大前端架构师1期

    2024-05-16 11:08:13       28 阅读
  5. 基于SpringCloudGateway实现接口鉴权

    2024-05-16 11:08:13       36 阅读
  6. docker 配置文件使用经验,后续持续增加

    2024-05-16 11:08:13       36 阅读
  7. 记录一下-排查免密登录过程

    2024-05-16 11:08:13       31 阅读
  8. Oracle如何实现rsa加密和例子

    2024-05-16 11:08:13       28 阅读
  9. GPT3.5与GPT4.0的差别对比

    2024-05-16 11:08:13       33 阅读