I hereby claim:
- I am trypag on github.
- I am trypag (https://keybase.io/trypag) on keybase.
- I have a public key whose fingerprint is 4538 4367 0091 3EE2 47EC 605F 85CD C328 F74C F395
To claim this, I am signing this object:
training with 273 patches | |
validating with 682 patches | |
architecture: ModSegNet | |
number of workers: 4 | |
number of epochs: 170 | |
starting epoch: 0 | |
batch size: 8 | |
learning rate: 0.001000 | |
learning rate decay: 0.00100 | |
momentum: 0.90000 |
import tensor_comprehensions as tc | |
import torch | |
def main(): | |
lang = """ | |
def graph2(float(N, C, H, W) I, float(N, C, L, M) J, float(KH, KW) W1) -> (O, G) {{ | |
O(n, c, h, w) +=! I(n, c, h + kh, w + kw) * W1(kh, kw) | |
G(c, c) +=! I(n, c, h, w) * J(n, c, h, w) | |
}} |
import torch | |
from torch.autograd import Variable | |
def accuracy_2d(output, target, topk=(1,)): | |
""" | |
Computes the precision@k for the specified values of k | |
Considers output is : NxCxHxW and target is : NxHxW | |
""" | |
maxk = max(topk) |
def train(train_loader, model, criterion, optimizer, epoch, logger): | |
batch_time = AverageMeter() | |
data_time = AverageMeter() | |
losses = AverageMeter() | |
top1 = AverageMeter() | |
top3 = AverageMeter() | |
# switch to train mode | |
model.train() |
def accuracy_2d(output, target, topk=(1,)): | |
""" | |
Computes the precision@k for the specified values of k | |
Considers output is : NxCxHxW and target is : NxHxW | |
""" | |
maxk = max(topk) | |
batch_size = target.size(0) | |
total_nelem = batch_size*target.size(-1)*target.size(-2) |
I hereby claim:
To claim this, I am signing this object: