(data_format)
| 37 | |
| 38 | |
| 39 | def get_data_format(data_format): |
| 40 | assert isinstance(data_format, str), "data_format must be a string" |
| 41 | if data_format.startswith("NC"): |
| 42 | return "channels_first" |
| 43 | elif data_format.startswith("N") and data_format.endswith("C"): |
| 44 | return "channels_last" |
| 45 | else: |
| 46 | assert data_format == "", ValueError( |
| 47 | 'data_format must be "N...C" or "NC..." or ""' |
| 48 | ) |
| 49 | return "" |
| 50 | |
| 51 | |
| 52 | def calc_fan(shape, mode, data_format): |
no outgoing calls
no test coverage detected