Skip to content

Instantly share code, notes, and snippets.

View chunchet-ng's full-sized avatar
🎯
Focusing

Chun Chet Ng chunchet-ng

🎯
Focusing
View GitHub Profile
@chunchet-ng
chunchet-ng / psa.py
Created October 27, 2022 05:05
Polarized Self-Attention - Parallel Variant
import torch
import torch.nn as nn
import os
import random
import numpy as np
from tqdm import tqdm
def set_seed(seed):