(target_cls_name, module)
| 178 | |
| 179 | |
| 180 | def find_class_in_module(target_cls_name, module): |
| 181 | target_cls_name = target_cls_name.replace('_', '').lower() |
| 182 | clslib = importlib.import_module(module) |
| 183 | cls = None |
| 184 | for name, clsobj in clslib.__dict__.items(): |
| 185 | if name.lower() == target_cls_name: |
| 186 | cls = clsobj |
| 187 | |
| 188 | if cls is None: |
| 189 | print("In %s, there should be a class whose name matches %s in lowercase without underscore(_)" % (module, target_cls_name)) |
| 190 | exit(0) |
| 191 | |
| 192 | return cls |
| 193 | |
| 194 | |
| 195 | def save_network(net, label, epoch, opt): |
nothing calls this directly
no outgoing calls
no test coverage detected