(self, model, data, epochs, model_name, save_model=True)
| 28 | self.encoder = Model(input_data, encoded3) |
| 29 | |
| 30 | def train_model(self, model, data, epochs, model_name, save_model=True): |
| 31 | |
| 32 | model.compile(loss="mean_squared_error", optimizer="adam", metrics=['acc', 'mae']) |
| 33 | |
| 34 | train = data |
| 35 | ntrain = np.array(train) |
| 36 | train_data = np.reshape(ntrain, (len(ntrain), 1, self.input_shape)) |
| 37 | |
| 38 | model.fit(train_data, train_data, epochs=epochs) |
| 39 | |
| 40 | if save_model: |
| 41 | model.save(f"models/saved_models/{model_name}.h5") |
| 42 | |
| 43 | def test_model(self, model, data): |
| 44 | test = data |
nothing calls this directly
no outgoing calls
no test coverage detected