Encode a list of BlockArgs to a list of strings. Args: blocks_args (list[namedtuples]): A list of BlockArgs namedtuples of block args. Returns: block_strings: A list of strings, each string is a notation of block.
(blocks_args)
| 365 | |
| 366 | @staticmethod |
| 367 | def encode(blocks_args): |
| 368 | """Encode a list of BlockArgs to a list of strings. |
| 369 | Args: |
| 370 | blocks_args (list[namedtuples]): A list of BlockArgs namedtuples of block args. |
| 371 | Returns: |
| 372 | block_strings: A list of strings, each string is a notation of block. |
| 373 | """ |
| 374 | block_strings = [] |
| 375 | for block in blocks_args: |
| 376 | block_strings.append(BlockDecoder._encode_block_string(block)) |
| 377 | return block_strings |
| 378 | |
| 379 | |
| 380 | class SwishImplementation(torch.autograd.Function): |
nothing calls this directly
no test coverage detected