MCPcopy Create free account
hub / github.com/NVIDIA/semantic-segmentation / fmt_scale

Function fmt_scale

utils/misc.py:503–513  ·  view source on GitHub ↗

format scale name :prefix: a string that is the beginning of the field name :scale: a scale value (0.25, 0.5, 1.0, 2.0)

(prefix, scale)

Source from the content-addressed store, hash-verified

501
502
503def fmt_scale(prefix, scale):
504 """
505 format scale name
506
507 :prefix: a string that is the beginning of the field name
508 :scale: a scale value (0.25, 0.5, 1.0, 2.0)
509 """
510
511 scale_str = str(float(scale))
512 scale_str.replace('.', '')
513 return f'{prefix}_{scale_str}x'

Callers 3

eval_minibatchFunction · 0.90
nscale_forwardMethod · 0.90
nscale_forwardMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected