MCPcopy Create free account
hub / github.com/BrainCoTech/RevoLab / _shape_list_from_state

Function _shape_list_from_state

scripts/hora/export_onnx.py:225–229  ·  view source on GitHub ↗
(state: dict[str, Any], key: str)

Source from the content-addressed store, hash-verified

223
224
225def _shape_list_from_state(state: dict[str, Any], key: str) -> list[int] | None:
226 tensor = state.get(key)
227 if tensor is None or not hasattr(tensor, "shape"):
228 return None
229 return [int(x) for x in tuple(tensor.shape)]
230
231
232def _resolve_scale_keys_from_config(cfg: Any | None) -> list[float]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected