(decoder_block, path)
| 32 | save_resnet_block(mid.block_2, pathlib.Path(path, 'block_2')) |
| 33 | |
| 34 | def save_decoder_block(decoder_block, path): |
| 35 | pathlib.Path(path).mkdir(parents=True, exist_ok=True) |
| 36 | |
| 37 | if 'block' in decoder_block: |
| 38 | save_resnet_block(decoder_block["block"][0], pathlib.Path(path, 'res1')) |
| 39 | save_resnet_block(decoder_block["block"][1], pathlib.Path(path, 'res2')) |
| 40 | save_resnet_block(decoder_block["block"][2], pathlib.Path(path, 'res3')) |
| 41 | |
| 42 | if 'upsample' in decoder_block: |
| 43 | save_conv2d(decoder_block['upsample']['conv'], pathlib.Path(path, 'upsampler')) |
| 44 | |
| 45 | |
| 46 | def save_decoder(decoder, path): |
no test coverage detected