From 48d6f2d0c0878a18c1423bec3f866842d5ec5647 Mon Sep 17 00:00:00 2001 From: natema Date: Wed, 3 Jun 2020 17:03:08 +0200 Subject: [PATCH] Fixing output format for `onehot` `Flux.OneHotVector` is displayed as a binary vector (0/1) rather than a boolean (true/false) one, as is also shown in successive examples in the same page, so I fixed the `onehot(:b, [:a, :b, :c])` and `onehot(:c, [:a, :b, :c])` output as given by the current Julia version 1.4.2. --- docs/src/data/onehot.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/data/onehot.md b/docs/src/data/onehot.md index 23d6f196..9745a807 100644 --- a/docs/src/data/onehot.md +++ b/docs/src/data/onehot.md @@ -7,15 +7,15 @@ julia> using Flux: onehot, onecold julia> onehot(:b, [:a, :b, :c]) 3-element Flux.OneHotVector: - false - true - false + 0 + 1 + 0 julia> onehot(:c, [:a, :b, :c]) 3-element Flux.OneHotVector: - false - false - true + 0 + 0 + 1 ``` The inverse is `onecold` (which can take a general probability distribution, as well as just booleans).