MCPcopy Create free account
hub / github.com/TalwalkarLab/leaf / val_to_vec

Function val_to_vec

models/utils/language_utils.py:130–142  ·  view source on GitHub ↗

Converts target into one-hot. Args: size: Size of vector. val: Integer in range [0, size]. Returns: vec: one-hot vector with a 1 in the val element.

(size, val)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

process_yMethod · 0.90
process_yMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…