Skip to content

Instantly share code, notes, and snippets.

View shihanmax's full-sized avatar
🎯
Focusing

Mashihan shihanmax

🎯
Focusing
View GitHub Profile
@ChristopherA
ChristopherA / git-submodule-tips.md
Last active May 24, 2024 10:24
`git submodule` Tips #git #submodule

git submodule Tips

To clone a repo with submodules

git clone --recursive [email protected]:url_to/awesome_submodule.git path_to_awesome_submodule

Add a submodule clone into an existing repo

git submodule add [email protected]:url_to/awesome_submodule.git path_to_awesome_submodule
@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.