MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _convert_one_hot

Function _convert_one_hot

tensorflow/python/ops/parallel_for/pfor.py:1853–1862  ·  view source on GitHub ↗
(pfor_input)

Source from the content-addressed store, hash-verified

1851
1852@RegisterPFor("OneHot")
1853def _convert_one_hot(pfor_input):
1854 indices = pfor_input.stacked_input(0)
1855 depth = pfor_input.unstacked_input(1)
1856 on_value = pfor_input.unstacked_input(2)
1857 off_value = pfor_input.unstacked_input(3)
1858 axis = pfor_input.get_attr("axis")
1859 if axis >= 0:
1860 axis += 1
1861 return wrap(
1862 array_ops.one_hot(indices, depth, on_value, off_value, axis), True)
1863
1864
1865@RegisterPFor("Slice")

Callers

nothing calls this directly

Calls 4

stacked_inputMethod · 0.80
unstacked_inputMethod · 0.80
wrapFunction · 0.70
get_attrMethod · 0.45

Tested by

no test coverage detected