Hierarchical BERT with an adaptive fine-tuning strategy for document classification