8000 GitHub - XMUDeepLIT/FSRE-HDN: Code for "HyperNetwork-based Decoupling to Improve Model Generalization for Few-Shot Relation Extraction" (EMNLP 2023)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Code for "HyperNetwork-based Decoupling to Improve Model Generalization for Few-Shot Relation Extraction" (EMNLP 2023)

Notifications You must be signed in to change notification settings

XMUDeepLIT/FSRE-HDN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSRE-HDN

This repo contains the code and data for HyperNetwork-based Decoupling to Improve Model Generalization for Few-Shot Relation Extraction (EMNLP-2023).

Requirements

  • Python 3.7.4
  • PyTorch 1.7.0
  • CUDA 10.2

Dataset

The expected structure of files is:


 |-- checkpoint
 |-- data
 |-- fewshot_re_kit
 |-- logs
 |-- models
 |-- train_demo.py
 |-- run_bert.sh

Code

Our model HND is placed in the HND.py file.

Our two-stage training strategy can be found on lines 220 to 320 of the framework.py file in the fewshot_re_kit folder.

Training

You can train a N-way-K-shot model by:

sh run_bert.sh

In the file run_bert.sh, we can modify the settings and hyper-parameters of the model.

About

Code for "HyperNetwork-based Decoupling to Improve Model Generalization for Few-Shot Relation Extraction" (EMNLP 2023)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0