huggingface / huggingface/candle

Implement prod_all and prod_keepdim

Open
#1,620 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

prod_all / prod_keepdim are like sum_all / sum_keepdim but for product. [numpy](https://numpy.org/doc/stable/reference/generated/numpy.prod.html) has this implemented. It is the torch.prod equivalent with the dim argument. It will be good to have this implemented.

The library I am working on [burn](https://github.com/tracel-ai/burn) - is adding this functionality but I have to implement it for candle in the burn codebase.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing sum_all and sum_keepdim implementations in candle and compare their behavior with the requested prod_all and prod_keepdim operations. Use numpy.prod and torch.prod with a dim argument as references; done means both product operations support the corresponding dimension behavior and keep-dimension variant.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.