Why doesn't this work:
NetGraph[{PartLayer[{1}], PartLayer[{2}],
EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"male", "female"}}]],
EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"child", "adult", "senior"}}]],
CatenateLayer[]}, {1 -> 3 -> 5, 2 -> 4 -> 5}]
NetGraph::tyfail2: Inferred inconsistent dimensions for array "Weights" of third layer (a 2*50 matrix of real numbers versus a 3*50 matrix of real numbers).
But this does:
NetGraph[{PartLayer[{1}], PartLayer[{2}],
EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"male", "female", "placeholder"}}]],
EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"child", "adult", "senior"}}]],
CatenateLayer[]}, {1 -> 3 -> 5, 2 -> 4 -> 5}]
Obviously, I'm misunderstanding something very basic, but I can't figure out what it is.
NetGraph
? $\endgroup$PartLayer
):NetGraph[{EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"male", "female"}}]], EmbeddingLayer[50, "Input" -> NetEncoder[{"Class", {"child", "adult", "senior"}}]], CatenateLayer[]}, {NetPort["Input1"] -> 1 -> 3, NetPort["Input2"] -> 2 -> 3}]
$\endgroup$