MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / _get_prob

Function _get_prob

gsplat/compression/entropy_coding_compression.py:282–294  ·  view source on GitHub ↗
(symbols: np.array, bitwidth: int=8)

Source from the content-addressed store, hash-verified

280 return params
281
282def _get_prob(symbols: np.array, bitwidth: int=8) -> np.array:
283 prob_list = []
284 for i in range(symbols.shape[-1]):
285 counts = np.bincount(symbols[..., i].ravel(), minlength=2**bitwidth)
286
287 prob = counts / counts.sum()
288 prob = prob.astype(np.float32)
289
290 prob_list.append(prob)
291
292 stacked_prob_npy = np.stack(prob_list, axis=0)
293
294 return stacked_prob_npy
295
296def _get_likelihood(symbols: np.array, bitwidth: int=8) -> np.array:
297 pass

Callers 1

_compress_factorized_ansFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected