-
Ask Your Neurons: A Neural-Based Approach to Answering Questions About Images
- Mateusz Malinowski, Marcus Rohrbach, Mario Fritz
-
Aligning Books and Movies: Towards Story-Like Visual Explanations by Watching Movies and Reading Books
- Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, Sanja Fidler
-
Learning Query and Image Similarities With Ranking Canonical Correlation Analysis
-
Wah Ngo
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
# "Colorizing B/W Movies with Neural Nets", | |
# Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies | |
# BACKGROUND: http://tinyclouds.org/colorize/ | |
# DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4 | |
# USAGE: | |
# 1. Download TensorFlow model from: http://tinyclouds.org/colorize/ | |
# 2. Use FFMPEG or such to extract frames from video. | |
# 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands: | |
# mogrify -resize 224x224 *.jpg | |
# mogrify -gravity center -background black -extent 224x224 *.jpg |
- 对机器学习有基本的理解,最好的材料是Andrew Ng在coursera上的公开课程,看过教程能让你对机器学习有基本的认识,完成课程中的任务会让你对机器学习有更深入的理解
- 接下来需要培养对神经网络的感觉,实现一个神经网络,并利用它做点事情
- 理解神经网络的原理很重要,但简单的神经网络并不足以解决最有趣的问题。神经网络的变体-卷积神经网络(CNN)非常适合于图像识别类的任务,斯坦福大学的有关资料如下:CS231n 用于图像识别的卷积神经网络(笔记)和课件。另外两个参考资料如下CNN 参考资料1和CNN 参考资料1
- 接下来需要在自己的电脑上运行CNN
- Digit提供了少量算法,比如用于字符识别的lenet算法和用于图像分类的Googlenet算法。要想运行这些算法,需要下载相应的数据集lenet数据集和[Googlenet数据集
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
#include "caffeclassifier.h" | |
CaffeClassifier::CaffeClassifier(const string& model_file, | |
const string& trained_file, | |
const string& mean_file, | |
const string& label_file, | |
const bool use_GPU, | |
const int batch_size) { | |
if (use_GPU) | |
Caffe::set_mode(Caffe::GPU); |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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 sys | |
import os | |
import numpy as np | |
import theano | |
import theano.tensor as T | |
import lasagne as nn | |
import time | |
from PIL import Image | |
from scipy.stats import norm | |
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams |
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 | |
import math | |
import torch.optim | |
from torch.optim.optimizer import Optimizer, required | |
class AdamHD(Optimizer): | |
"""Implements Adam algorithm. | |
It has been proposed in `Adam: A Method for Stochastic Optimization`_. | |
Arguments: | |
params (iterable): iterable of parameters to optimize or dicts defining | |
parameter groups |
The fundamental unit in PyTorch is the Tensor. This post will serve as an overview for how we implement Tensors in PyTorch, such that the user can interact with it from the Python shell. In particular, we want to answer four main questions:
- How does PyTorch extend the Python interpreter to define a Tensor type that can be manipulated from Python code?
- How does PyTorch wrap the C libraries that actually define the Tensor's properties and methods?
- How does PyTorch cwrap work to generate code for Tensor methods?
- How does PyTorch's build system take all of these components to compile and generate a workable application?
PyTorch defines a new package torch
. In this post we will consider the ._C
module. This module is known as an "extension module" - a Python module written in C. Such modules allow us to define new built-in object types (e.g. the Tensor
) and to call C/C++ functions.