caffe – Check failed: proto.SerializeToOstream(&output)

You suddenly get this error when training/saving a model in Caffe or saving a model in pycaffe.

io.cpp:69] Check failed: proto.SerializeToOstream(&output)
*** Check failure stack trace: ***

Here are two possible reasons for this error

  1. The directory the snapshot is trying to write the .caffemodel into does not exist
  2. You are out of disk space

Continue reading “caffe – Check failed: proto.SerializeToOstream(&output)”

An Anthropologist on Mars – Oliver Sacks – audiobook review

Title: An Anthropologist on Mars
Author: Oliver Sacks
Narrator: Jonathan Davis
Year: 1995
Tags; non-fiction; clinical; neurology;

Overall impressions

This book is in the same spirit as Dr. Sack’s earlier enjoyable book, The Man Who Mistook His Wife for a Hat. Of the two, while I preferred his earlier work, this book, An Anthropologist on Mars, is still definitely worth a read/listen. If you read only one, choose The Man Who Mistook His Wife for a Hat. If you liked that book, and you want more of the same, then this is it.
Continue reading “An Anthropologist on Mars – Oliver Sacks – audiobook review”

Recommended Audible audiobooks

I’ve written before about my affection for Audible audiobooks. Now I’m putting together a list of books that I have read, along with summaries for each.

Below I started a list of audiobooks that I read, but I decided to move to a new table format, which you can view here. I’ve left the below list for historical purposes, and recommend you check out my updated recommended book list instead.

Currently reading – audible audiobooks

The Fountainhead


Sample audio clip: The purpose of Rand’s novels: the ideal human.

Author: Ayn Rand
Tags: fiction;
Summary. Portrayal of Rand’s ideal humans, and their morality.
Full review: Coming soon.

Continue reading “Recommended Audible audiobooks”

How to upload sitemap.xml to google app engine

Ah the world wide web… the old www. So many factors to consider when developing web applications, especially if you’re used to developing in a relatively simple research environment.

One thing you will think about is how to get Google to include your page in it’s searchers (i.e., get indexed). To do this, we’ll submit a sitemap to Google. Basically a sitemap lists the links that you want Google to start indexing (so other people can find it when they search the web).

If you’re using WordPress, this is pretty simple, and you can just download a plugin and skip to the last step below (step 6).

However, if you’re using Google App Engine to run your site, then you need to do a few more steps. So here’s instructions for how to do this.
Continue reading “How to upload sitemap.xml to google app engine”

ubuntu – black screen on ubuntu laptop after installing nvidia drivers

I’m running Ubuntu on my Lenovo Y50 laptop, with a Nvidia GPU. And every time I do an update (or restart it?), I see the Ubuntu logo, hear the chime to log in, and then see a blank black screen, or a small white dot in the upper corner.

Other times, after a reboot, I get to the login screen, enter my username and password, then everything flickers violently, and it loops back to asks me to enter in my info again.

Today this post is not about how to permanently fix this (although that would be nice), but rather how to get your GUI back (until you update/restart your machine again).

It seems that on some laptops, the Nvidia drivers and Ubuntu do not always nicely play together. Why? I am not sure.

But anyways, here’s how to get fix your laptop when Ubuntu has a black screen on login (assuming your problem is related to the Nvidia drivers).
Continue reading “ubuntu – black screen on ubuntu laptop after installing nvidia drivers”

multi-resolution-tract CNN with hybrid pretrained and skin-lesion trained layers

Our paper entitled: “Multi-resolution-Tract CNN with Hybrid Pretrained and Skin-Lesion Trained Layers” was accepted and presented as an oral talk in the Machine Learning in Medical Imaging (MLMI) Workshop (part of the MICCAI conference).

In this work, we used a convolutional neural network (CNN) to classify 10 different types of skin lesions, including melanoma and non-melanoma types.

The key technical contribution was to use multiple tracts (or paths) within the neural network, to train (and test) the network on an image using multiple image resolutions simultaneously. Additionally, we extended a CNN pretrained on a single image resolution to work for multiple image resolutions.

Here are our slides presented at MLMI (thanks Aïcha!) showing our deep learning approach to classify skin disease:
Continue reading “multi-resolution-tract CNN with hybrid pretrained and skin-lesion trained layers”

(deep convolutional) generative adversarial nets – slides

There’s this really neat new idea on how to train neural networks that recently came out know as generative adversarial nets (GAN).

The basic idea of a GAN is to train two networks to compete with each other (hence the name “adversarial“). One network (called the generator) creates images that look just like real images. The other network (called the discriminator) distinguishes between real images and those images the generator produced.

Thus the two networks compete with each other, where the generator generates images to fool the discriminator, and the discriminator discriminates between the generator’s images and real images.

Continue reading “(deep convolutional) generative adversarial nets – slides”

Using numpy on google app engine with the anaconda python distribution

Scenario
– you are using the Google App Engine (GAE) development server with Python
– you installed the Anaconda Python distribution
– you want to use the Numpy library with GAE

On Ubuntu and on Mac (but not Windows for some reason), you get this error when trying to deploy:
google app engine ImportError: No module named _ctypes

The tldr; solution
Create an Anaconda environment using numpy 1.6 and python 2.7:

conda create —n np16py27 anaconda numpy=1.6 python=2.7

Load this specific environment from the command line:

source activate np16py27

Run your GAE dev server:

dev_appserver.py my_gae_project

That’s it! You can read more details below if you are interested.
Continue reading “Using numpy on google app engine with the anaconda python distribution”

how to compute true/false positives and true/false negatives in python for binary classification problems

Here’s how to compute true positives, false positives, true negatives, and false negatives in Python using the Numpy library.

Note that we are assuming a binary classification problem here. That is a value of 1 indicates a positive class, and a value of 0 indicates a negative class. For multi-class problems, this doesn’t really hold.

Continue reading “how to compute true/false positives and true/false negatives in python for binary classification problems”

Deep Dreams and a Neural Algorithm of Artistic Style – slides and explanations

Perhaps you saw an earlier post I wrote about deep dreaming Prague pictures, and you said to your self, “self, I wish I knew more about the techniques to make those crazy looking pictures.”

Well you are in luck since I’ve now posted the slides where I attempted to explain these two works to our reading group: 1) Google’s DeepDream, and 2) A Neural Algorithm of Artistic Style.

Continue reading “Deep Dreams and a Neural Algorithm of Artistic Style – slides and explanations”