Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve layer debug strings (increase signal-to-noise ratio):
- Include n_in/n_out info only when non-default values (!= 1). - Change from "MyLayer{in=2,out=2}" to "MyLayer_in2_out2". - Remove "sublayers=" from repr string. - Add spaces inside square brackets, remove commas. - Combined example: "Foo{in=1,out=2,sublayers=[Bar{in=1,out=1}, Baz{in=1,out=1}]}" --> "Foo_out2[ Bar Baz ]" - Add selection indices to Select layer name. Samples using new __repr__: 1. Mnist model: Serial[ Flatten Dense Relu Dense Relu Dense LogSoftmax ] 2. Atari CNN model, raw debug string: Serial[ F Branch_out4[ Select[0,0,0,0]_out4 Parallel_in4_out4[ Serial Serial[ ShiftRight ] Serial[ ShiftRight ShiftRight ] Serial[ ShiftRight ShiftRight ShiftRight ] ] ] Concatenate_in4 Conv Relu Conv Relu Flatten Dense Relu ] 2'. Atari CNN model, debug string + hand-done white space additions Serial[ F Branch_out4[ Select[0,0,0,0]_out4 Parallel_in4_out4[ Serial Serial[ ShiftRight ] Serial[ ShiftRight ShiftRight ] Serial[ ShiftRight ShiftRight ShiftRight ] ] ] Concatenate_in4 Conv Relu Conv Relu Flatten Dense Relu ] PiperOrigin-RevId: 307533870
- Loading branch information