(net_def)
| 72 | |
| 73 | |
| 74 | def _op_stats(net_def): |
| 75 | type_count = {} |
| 76 | for t in [op.type for op in net_def.op]: |
| 77 | type_count[t] = type_count.get(t, 0) + 1 |
| 78 | type_count_list = sorted(type_count.items(), key=lambda kv: kv[0]) # alphabet |
| 79 | type_count_list = sorted(type_count_list, key=lambda kv: -kv[1]) # count |
| 80 | return "\n".join("{:>4}x {}".format(count, name) for name, count in type_count_list) |
| 81 | |
| 82 | |
| 83 | def _assign_device_option( |
no test coverage detected