clear() at first (for the same reason as in train())