Class Relevance Learning For Out-of-distribution Detection