Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug in UniformQuantize class #4

@michaelklachko

Description

@michaelklachko

Hi, thank you for posting your code!

I think there's a mismatch of the argument order between here and here.

def forward(cls, ctx, input, num_bits=8, min_value=None, max_value=None, stochastic=False, inplace=False, enforce_true_zero=False, num_chunks=None, out_half=False)
UniformQuantize().apply(  x, num_bits,   min_value,      max_value,      num_chunks,       stochastic,    inplace)

Among other potential issues, this causes stochastic arg to take the value of num_chunks, sometimes making it true, and leading to "stochastic" rounding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions