class MockSkorchNet: def __init__(self): self.device = "cpu" self.forward_iter = None self.history = History() self.history.new_epoch() self._default_callbacks = [] def fit(self, X, y=None): return self def predict(self, X): return np.concatenate( [to_numpy(x.argmax(1)) for x in self.forward_iter(X)], 0) def get_iterator(self, X_test, training): return DataLoader(X_test, batch_size=2)
def __init__(self): self.device = "cpu" self.forward_iter = None self.history = History() self.history.new_epoch() self._default_callbacks = []