Use of underscore in interger values or Number values in Tensorflow documentation

If we check below documentation

it uses underscore (_) in the interger values like for batch size . What does this underscore signifies is it same as decimal ?

Do you mean this kind of underscore usage?

train = shuffled.take(80_000)
test = shuffled.skip(80_000).take(20_000)

If so, that’s a Python convention used to make longer-form numbers easier to read. They add no semantic value to the language but make life easier for us humans. Writing 10_000_000 is the same as writing 10000000 or 1e7.

See PEP-515

1 Like