Why does Trax automatically create a Serial layer over a sublayer?

65 views Asked by At

I implemented a Serial Layer in Trax (deep learning library by Google). Why does an additional Serial layer is created in spite of already declaring one?

Below is the code.

model = tl.Serial(
        tl.Dense(n_units=512),
        tl.Relu()
        )
print(model)

The output is:

Serial[
  Dense_512
  Serial[
     Relu
  ]

]

While it should have been

Serial[
  Dense_512
  Relu
]
0

There are 0 answers