This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: fluent-bit | |
namespace: amazon-cloudwatch | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: fluent-bit-role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/Downloads | |
# Google Chrome | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome-stable_current_amd64.deb | |
# Anaconda | |
wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh # Change version if needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install g++ | |
pip install git+https://github.com/pytorch/fairseq.git@698e3b91ffa832c286c48035bdff78238b0de8ae | |
git clone https://github.com/wasiahmad/PLBART | |
# PreTrained | |
## Download pre-trained checkpoint | |
cd PLBART/pretrain | |
bash download.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
intermediate() { | |
local seed=$1 | |
local ckpt=$2 | |
local step=$((ckpt/1000)) | |
local multiberts_ckpt_dir="multiberts-seed-${seed}-${step}k" | |
mkdir $multiberts_ckpt_dir | |
huggingface-cli repo create --yes ${multiberts_ckpt_dir} --organization google |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67 | |
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inp = torch.from_numpy(np.random.normal(0,1,size=(100,784))).to(device).float() | |
temp = vae(inp) | |
temp = temp.data.reshape(100,1,28,28) | |
grid = torchvision.utils.make_grid(temp,nrow=10) | |
print(grid.shape) | |
plt.imshow(grid.to('cpu').permute(1,2,0)) | |
plt.gcf().set_size_inches(20,10) | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vae = VAE() | |
vae.to(device) | |
criterion = nn.MSELoss() | |
optimizer = optim.Adamax(vae.parameters(),lr = 1e-4) | |
l = None | |
for epoch in range(100): | |
for i, data in enumerate(loader,0): | |
inputs,classes = data | |
inputs,classes = Variable(inputs.resize_(batch_size,784)).to(device),Variable(classes).to(device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VAE(nn.Module): | |
def __init__(self): | |
super(VAE,self).__init__() | |
self.encoder = nn.Sequential(nn.Linear(784,128),nn.ReLU(),nn.Linear(128,64),nn.ReLU()) | |
self.decoder = nn.Sequential(nn.Linear(64,128),nn.ReLU(),nn.Linear(128,784)) | |
self._mu = nn.Linear(64,64) | |
self._log_sigma = nn.Linear(64,64) | |
def sampler(self,encoding): | |
mu = self._mu(encoding) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inp = torch.from_numpy(np.random.normal(0,1,size=(100,64))).to(device).float() | |
temp = ae.decoder(inp) | |
temp = temp.data.reshape(100,1,28,28) | |
grid = torchvision.utils.make_grid(temp,nrow=10) | |
print(grid.shape) | |
plt.imshow(grid.to('cpu').permute(1,2,0)) | |
plt.gcf().set_size_inches(20,10) | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae = AE() | |
ae.to(device) | |
criterion = nn.MSELoss() | |
optimizer = optim.Adamax(ae.parameters(),lr = 1e-4) | |
l = None | |
for epoch in range(100): | |
for i, data in enumerate(loader,0): | |
inputs,classes = data | |
inputs,classes = Variable(inputs.resize_(batch_size,784)).to(device),Variable(classes).to(device) |
NewerOlder