Get a fake input shape e.g. [N, C, H, W] or [N, C, H, W, D], whose batch size is 1, from the given parser. Args: parser: a ConfigParser which contains the i/o information of a bundle.
(parser: ConfigParser)
| 1143 | |
| 1144 | |
| 1145 | def _get_fake_input_shape(parser: ConfigParser) -> tuple: |
| 1146 | """ |
| 1147 | Get a fake input shape e.g. [N, C, H, W] or [N, C, H, W, D], whose batch size is 1, from the given parser. |
| 1148 | |
| 1149 | Args: |
| 1150 | parser: a ConfigParser which contains the i/o information of a bundle. |
| 1151 | """ |
| 1152 | input_channels, input_spatial_shape, _, _, _ = _get_net_io_info(parser=parser) |
| 1153 | spatial_shape = _get_fake_spatial_shape(input_spatial_shape) |
| 1154 | input_shape = (1, input_channels, *spatial_shape) |
| 1155 | return input_shape |
| 1156 | |
| 1157 | |
| 1158 | def verify_net_in_out( |
no test coverage detected
searching dependent graphs…