Title: Deep Learning Modules
Summary Date: 2017-08-26 22:05:00
Tags: gsoc, rbm, ssRBM, deep learning
Author: Kris Singh
# Path of eigen checked out from devlopement branch | |
cmake_minimum_required(VERSION 3.4) | |
project(Test) | |
set(CMAKE_CXX_FLAGS "-std=c++11") | |
include_directories(/Users/kris/Desktop/kmean/eigen-git-mirror) | |
add_executable(main eigen_example.cpp) | |
#include <algorithm> | |
#include <cmath> |
from joblib import Parallel, delayed | |
import Queue | |
import os | |
# Define number of GPUs available | |
N_GPU = 4 | |
# Put indices in queue | |
q = Queue.Queue(maxsize=N_GPU) | |
for i in range(N_GPU): |
#include <torch/torch.h> | |
#include <iostream> | |
#include <ATen/Parallel.h> | |
#include <ATen/Aten.h> | |
using namespace at; | |
// using namespace torch; | |
void submodular_select(Tensor candidate_points, Tensor features_done, Tensor features) | |
{ |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torchvision import datasets, transforms | |
def backward_hook_function(grad_out): | |
print(grad_out.shape) | |
print(grad_out.norm()) | |
# print("grad_norm", grad_in.norm()) |
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | |
#include "cpu/vision.h" | |
template <typename scalar_t> | |
at::Tensor soft_nms_cpu_kernel(const at::Tensor& dets, | |
at::Tensor& scores, | |
const float threshold) { | |
AT_ASSERTM(!dets.type().is_cuda(), "dets must be a CPU tensor"); | |
AT_ASSERTM(!scores.type().is_cuda(), "scores must be a CPU tensor"); |
/** | |
* @file gan_network_test.cpp | |
* @author Kris Singh | |
* | |
* Tests the gan Network example from keras adverserial | |
* | |
* mlpack is free software; you may redistribute it and/or modify it under the | |
* terms of the 3-clause BSD license. You should have received a copy of the | |
* 3-clause BSD license along with mlpack. If not, see | |
* http://www.opensource.org/licenses/BSD-3-Clause for more information. |
class SelectLoss: | |
""" | |
Selection based on Loss values of samples. | |
No need of rejection sampling. | |
""" | |
def __init__(self, X, Y, fwd_batch_size, batch_size, _, loss): | |
""" | |
:param loss: loss function | |
:param x_train: training dataN |
class SelectLoss: | |
""" | |
Selection based on Loss values of samples. | |
No need of rejection sampling. | |
""" | |
def __init__(self, X, Y, fwd_batch_size, batch_size, _, loss): | |
""" | |
:param loss: loss function | |
:param x_train: training dataN |
from __future__ import division | |
from __future__ import print_function | |
import numpy as np | |
import six | |
import argparse | |
import keras | |
import gzip | |
import tensorflow as tf | |
import pickle | |
import pandas as pd |