(self, model, n_epochs=20)
| 154 | print("output model accuracy", acc) |
| 155 | |
| 156 | def loop(self, model, n_epochs=20): |
| 157 | self.probas = model.getProbas() |
| 158 | if self.verbose: |
| 159 | print("initialisation model accuracy", self.getAccuracy(self.probas)) |
| 160 | |
| 161 | if self.progressBar: |
| 162 | if type(self.progressBar) == bool: |
| 163 | pb = tqdm(total=n_epochs) |
| 164 | else: |
| 165 | pb = self.progressBar |
| 166 | |
| 167 | for epoch in range(1, n_epochs + 1): |
| 168 | self.performEpoch(model, epochInfo=(epoch, n_epochs)) |
| 169 | if self.progressBar: pb.update() |
| 170 | |
| 171 | # get final accuracy and return it |
| 172 | op_xj = model.getProbas() |
| 173 | acc = self.getAccuracy(op_xj) |
| 174 | return acc |
| 175 | |
| 176 | |
| 177 | def get_args(): |
no test coverage detected