Skip to content

Instantly share code, notes, and snippets.

View pohanchi's full-sized avatar
😃

pohan pohanchi

😃
  • 04:07 (UTC -12:00)
View GitHub Profile
@pohanchi
pohanchi / min-char-rnn.py
Created October 6, 2019 07:50 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@pohanchi
pohanchi / sap.py
Last active October 26, 2024 18:07
Self-attention-pooling module for speaker classification
import torch
from torch import nn
class SelfAttentionPooling(nn.Module):
"""
Implementation of SelfAttentionPooling
Original Paper: Self-Attention Encoding and Pooling for Speaker Recognition
https://arxiv.org/pdf/2008.01077v1.pdf
"""
@pohanchi
pohanchi / listen.sh
Last active December 14, 2021 15:31
TWCC-CLI Tools
#put it in your remote server
screen -ls | grep longjob | awk ' { print $1 }'
@pohanchi
pohanchi / human_emo_dgpt.sh
Created January 5, 2022 16:42
RUNNING_SCRIPT
for emo in annoyance pride joy sadness approval confusion;
do
for human_pt in {0..1};
do
echo "=================================================================="
echo "$emo-for-$human_pt-th human-pt"
source ~/.zshrc; tasker "human$emo-$human_pt" "bash run_emo_h.sh $emo dgpt $human_pt"
sleep 20
echo "=================================================================="
done
#/usr/bin/zsh
#test_task = ['<annoyance>', '<pride>', '<joy>', '<sadness>', '<approval>', '<confusion>']
# echo "container ID = ${curid}"
# echo "task name = ${1},"
# echo "mode= ${2},"
# echo "agent= ${3},"
# echo "prompt = ${4},"
# echo "bot = ${5},"
# echo "type = ${6},"