0

I don't understand what's the difference between the Branch and the Parallel combinators. They both seem to apply a list of layers in parallel, the only difference is that Branch applies them to copies of inputs -- what does that mean?

mrbuttonsmeow
  • 127
  • 1
  • 5

1 Answers1

-1

From the Trax documentation:

For example, suppose one has three layers:
F: 1 input, 1 output
G: 3 inputs, 1 output
H: 2 inputs, 2 outputs (h1, h2)

Then Branch(F, G, H) will take 3 inputs and give 4 outputs:
inputs: a, b, c
outputs: F(a), G(a, b, c), h1, h2 where h1, h2 = H(a, b)

Then Parallel(F, G, H) will take 6 inputs and give 4 outputs:
inputs: a, b, c, d, e, f
outputs: F(a), G(b, c, d), h1, h2 where h1, h2 = H(e, f)

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
pd0623
  • 1