Skip to content
Yi Zhu edited this page May 14, 2021 · 2 revisions

One Hot

oneHot encodes the dataset to fit the design of the sequential network.

oneHot(input::Array{Int64}, depth::Int64, dict::Dict; on_value::Float32=1.0f0, off_value::Float32=0.0f0)

input: the number to be encoded

depth: the total number of all possible outputs

dict: a dictionary that describes which index input should be.

on_value: the value for activated sign, default 1.0f0

off_value: the value for deactivated sign, default 0.0f0