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
http://43.4.22.206:8888/<html> | |
<head> | |
<style> | |
canvas { | |
border: 1px solid black; | |
} | |
</style> | |
</head> | |
<body> | |
<canvas id="canvas" width="600" height="400"></canvas> |
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
import numpy as np | |
data = np.array([[40, 35, 80], | |
[80, 50, 90], | |
[20, 55, 40], | |
[94, 80, 88], | |
[90, 30, 100]]) | |
print('Input data (N, featuers):', data, data.shape) | |
N = data.shape[0] | |
n_dim = data.shape[1] |
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
# -*- coding: utf-8 -*- | |
# ref: http://taotao54321.hatenablog.com/entry/2016/11/08/180245 | |
import numpy as np | |
import gym | |
from gym import wrappers | |
# Q learning params | |
ALPHA = 0.1 # learning rate | |
GAMMA = 0.99 # reward discount |
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
# https://github.com/pytorch/examples/blob/master/dcgan/main.py#L95-L102 | |
def weights_init(m): | |
classname = m.__class__.__name__ | |
if classname.find('Conv') != -1: | |
m.weight.data.normal_(0.0, 0.02) | |
elif classname.find('BatchNorm') != -1: | |
m.weight.data.normal_(1.0, 0.02) | |
m.bias.data.fill_(0) | |
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
# -*- coding: utf-8 -*- | |
# ref: https://gym.openai.com/evaluations/eval_1lfzNKEHS9GA7nNWE73w | |
import numpy as np | |
import gym | |
from gym import wrappers | |
# Q learning params | |
ALPHA = 0.1 # learning rate | |
GAMMA = 0.99 # reward discount |
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
import random | |
import torch | |
import torch.nn as nn | |
from torch.autograd import Variable | |
from torch import optim | |
import torch.nn.functional as F | |
seq_len = 10 | |
n_class = 5 | |
class SimpleNet(nn.Module): |
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
activate_conda(){ | |
eval "$(conda shell.zsh hook)" | |
conda activate $1 | |
} |
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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+0", | |
"command": "workbench.action.nextEditor" | |
}, | |
{ | |
"key": "ctrl+9", | |
"command": "workbench.action.previousEditor" | |
}, |
This file has been truncated, but you can view the full file.
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
あああ | |
ああい | |
ああう | |
ああえ | |
ああお | |
ああか | |
ああき | |
ああく | |
ああけ | |
ああこ |
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
243.2 67.0 1 | |
254.5 70.1 1 | |
253.1 59.3 1 | |
228.1 70.4 1 | |
240.8 69.5 1 | |
244.0 69.0 1 | |
257.9 66.3 1 | |
255.8 68.3 1 | |
249.9 63.5 1 | |
251.3 70.3 1 |
NewerOlder