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
git show-branch \ | |
| sed "s/].*//" \ | |
| grep "\*" \ | |
| grep -v "$(git rev-parse --abbrev-ref HEAD)" \ | |
| head -n1 \ | |
| sed "s/^.*\[//" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torch as th | |
class NLL_OHEM(th.nn.NLLLoss): | |
""" Online hard example mining. | |
Needs input from nn.LogSotmax() """ | |
def __init__(self, ratio): | |
super(NLL_OHEM, self).__init__(None, True) | |
self.ratio = ratio |
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 io | |
import os | |
import numpy as np | |
from PIL import Image | |
from pymongo import MongoClient | |
from torch.utils.data import Dataset, DataLoader | |
from torchvision import transforms | |
def pil_loader(f): |
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 math | |
from collections import OrderedDict | |
import torch.nn as nn | |
import torch.nn.init as init | |
import torch as th | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
class SPPLayer(nn.Module): |
NewerOlder