@staticmethod
def _init_model_with_state_dict(state):
    model = TARSTagger(task_name=state['current_task'], label_dictionary=state['tag_dictionary'], label_type=state['tag_type'], embeddings=state['tars_model'].embeddings, num_negative_labels_to_sample=state['num_negative_labels_to_sample'], prefix=state['prefix'])
    model._task_specific_attributes = state['task_specific_attributes']
    model.load_state_dict(state['state_dict'])
    return model
@staticmethod
def _init_model_with_state_dict(state):
    model = TARSTagger(task_name=state['current_task'], label_dictionary=state['tag_dictionary'], label_type=state['tag_type'], embeddings=state['tars_model'].embeddings, num_negative_labels_to_sample=state['num_negative_labels_to_sample'], prefix=state['prefix'])
    model._task_specific_attributes = state['task_specific_attributes']
    model.load_state_dict(state['state_dict'])
    return model