This file contains hidden or 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
from __future__ import print_function | |
import torch.nn.functional as F | |
# from torch.autograd import Variable | |
# import copy | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
from torch.utils.data import DataLoader | |
from torchvision import datasets, transforms |
This file contains hidden or 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
# taken and improvised from : https://github.com/jiyanggao/Video-Person-ReID/issues/6 | |
import numpy as np | |
from scipy.io import loadmat | |
q = loadmat('./mars/info/query_IDX.mat')['query_IDX'][0] | |
t = loadmat('./mars/info/tracks_test_info.mat')['track_test_info'] | |
query_inds = q - 1 # to get 0 based predefined array indices for query instances |
This file contains hidden or 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
running install | |
running bdist_egg | |
running egg_info | |
creating lltm_cuda.egg-info | |
writing lltm_cuda.egg-info/PKG-INFO | |
writing dependency_links to lltm_cuda.egg-info/dependency_links.txt | |
writing top-level names to lltm_cuda.egg-info/top_level.txt | |
writing manifest file 'lltm_cuda.egg-info/SOURCES.txt' | |
reading manifest file 'lltm_cuda.egg-info/SOURCES.txt' | |
writing manifest file 'lltm_cuda.egg-info/SOURCES.txt' |
This file contains hidden or 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-get install zsh | |
sudo apt-get install git | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt-get update | |
sudo apt-get install sublime-text-installer | |
dropbox | |
teamviewer | |
google-chrome |
This file contains hidden or 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, torch.nn as nn, torch.nn.functional as F | |
import numpy as np | |
import torch.optim as optim | |
# tied autoencoder using off the shelf nn modules | |
class TiedAutoEncoderOffTheShelf(nn.Module): | |
def __init__(self, inp, out, weight): | |
super().__init__() | |
self.encoder = nn.Linear(inp, out, bias=False) | |
self.decoder = nn.Linear(out, inp, bias=False) |
This file contains hidden or 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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
class model(nn.Module): | |
def __init__(self): | |
super(model, self).__init__() | |
self.conv1 = nn.Conv1d(9, 18, kernel_size=3) #9 input channels, 18 output channels | |
self.conv2 = nn.Conv1d(18, 36, kernel_size=3) #18 input channels from previous Conv. layer, 36 out | |
self.conv2_drop = nn.Dropout2d() #dropout |
This file contains hidden or 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
running install | |
running build_deps | |
+ USE_CUDA=0 | |
+ USE_ROCM=0 | |
+ USE_NNPACK=0 | |
+ USE_MKLDNN=0 | |
+ USE_GLOO_IBVERBS=0 | |
+ USE_DISTRIBUTED_MW=0 | |
+ FULL_CAFFE2=0 | |
+ [[ 10 -gt 0 ]] |
This file contains hidden or 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
# @Author: arul | |
# @Date: 2017-11-13T21:45:01+05:30 | |
# @Last modified by: arul | |
# @Last modified time: 2017-11-13T22:56:47+05:30 | |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run |
This file contains hidden or 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
if(opt.traintype == 'finetuning' and epoch == 1) then | |
-- find the number of elements for which the learning rates to be reduced | |
totalParams = 0; | |
isAfterCrossNeighbor = 0; | |
dontFreeze = 0; | |
for index, node in ipairs(model.modules) do | |
--currParams = node:getParameters() | |