(self)
| 222 | editor.show() |
| 223 | |
| 224 | def train_network(self): |
| 225 | config = self.root.config |
| 226 | shuffle = int(self._shuffle.value()) |
| 227 | |
| 228 | kwargs = dict(gputouse=None, autotune=False) |
| 229 | for k, spin_box in self._attribute_kwargs[self.root.engine].items(): |
| 230 | kwargs[k] = int(spin_box.value()) |
| 231 | if self.root.engine == Engine.PYTORCH: |
| 232 | snapshot_to_start_training_from = self.snapshot_selection_widget.selected_snapshot |
| 233 | if snapshot_to_start_training_from is not None: |
| 234 | kwargs["snapshot_path"] = snapshot_to_start_training_from |
| 235 | detector_to_start_training_from = self.detector_snapshot_selection_widget.selected_snapshot |
| 236 | if detector_to_start_training_from is not None: |
| 237 | kwargs["detector_path"] = detector_to_start_training_from |
| 238 | |
| 239 | compat.train_network(config, shuffle, **kwargs) |
| 240 | msg = QtWidgets.QMessageBox() |
| 241 | msg.setIcon(QtWidgets.QMessageBox.Information) |
| 242 | msg.setText("The network is now trained and ready to evaluate.") |
| 243 | msg.setInformativeText("Use the function 'evaluate_network' to evaluate the network.") |
| 244 | |
| 245 | msg.setWindowTitle("Info") |
| 246 | msg.setMinimumWidth(900) |
| 247 | self.logo_dir = os.path.dirname(os.path.realpath("logo.png")) + os.path.sep |
| 248 | self.logo = self.logo_dir + "/assets/logo.png" |
| 249 | msg.setWindowIcon(QIcon(self.logo)) |
| 250 | msg.setStandardButtons(QtWidgets.QMessageBox.Ok) |
| 251 | msg.exec_() |
| 252 | |
| 253 | @Slot(dict) |
| 254 | def _pose_cfg_change(self, pose_cfg: dict | None) -> None: |
no test coverage detected