Skip to content

Instantly share code, notes, and snippets.

View shihanmax's full-sized avatar
🎯
Focusing

Mashihan shihanmax

🎯
Focusing
View GitHub Profile
@JohnGiorgi
JohnGiorgi / biaffine_classifier.py
Last active November 2, 2023 04:58
PyTorch implementation of the biaffine attention operator from "End-to-end neural relation extraction using deep biaffine attention" (https://arxiv.org/abs/1812.11275) which can be used as a classifier for binary relation classification. If you spot an error or have an improvement, let me know!
import torch
class BiaffineAttention(torch.nn.Module):
"""Implements a biaffine attention operator for binary relation classification.
PyTorch implementation of the biaffine attention operator from "End-to-end neural relation
extraction using deep biaffine attention" (https://arxiv.org/abs/1812.11275) which can be used
as a classifier for binary relation classification.
@ChristopherA
ChristopherA / git-submodule-tips.md
Last active December 13, 2022 14:06
`git submodule` Tips #git #submodule

git submodule Tips

To clone a repo with submodules

git clone --recursive git@github.com:url_to/awesome_submodule.git path_to_awesome_submodule

Add a submodule clone into an existing repo

git submodule add git@github.com:url_to/awesome_submodule.git path_to_awesome_submodule