Giter VIP home page Giter VIP logo

iceberg_or_boat's Introduction

Iceberg or boat?

This program is used to demonstrate the use of a convolutional neural network in tensorflow used on the Statoil/C-CORE Iceberg Classifier Challenge dataset found at kaggle.com ( https://www.kaggle.com/c/statoil-iceberg-classifier-challenge/data). The purpose of this is to demonstrate the use of tensorflow to create a convolutional neural net that creates a straightforward graph for new users.

Getting Started

This scirpt uses python 3.5 and tensorflow 1.1.0 Supporting libraries are : pandas for data structuring numpy for linear algebra (mostly dealing with matricies) sklearn for log loss metrics for this particular competition

Data

Here the data is represented in flattened 75x75 pixels of radar bands.

Ship Images:

Iceberg Images:

Usage

I reccomend using a python virtual environment specifically for use of tensorflow. I am using anaconda with a conda virtual environment

def weight_variable(shape):
    initial = tf.truncated_normal(shape, stddev=0.1)
    return tf.Variable(initial)

def bias_variable(shape):
    initial = tf.constant(0.1, shape = shape)
    return tf.Variable(initial)

def conv2d(x, W):
    return tf.nn.conv2d(x, W, strides = [1,1,1,1],padding = 'SAME')

def max_pool_2x2(x):
    return tf.nn.max_pool(x, ksize = [1,2,2,1], strides = [1,2,2,1], padding = 'SAME')

These are the basis for our backbone of the CNN, just creating our weight variables/ bias variables of specific shapes to handle neurons math. We also have the two layers essential to a basic CNN the convolution layer and the max pooling layer.

x: Input

W: The weight variable for the layer

Training

Graph Creation

Full model:

Convolution Layer:

Each run builds a clean tensorboard graph that is used to demonstrate the framework of the network it will be put into a folder graph and can be run from command line by:

activate tensorflow virtual environment

tensorboard --logdir graph

From here you can go to your localhost:6006 and under the "graphs" section you may view your interactive board

Author

Jacob Biloki : [email protected]

License

This project is licensed under the MIT License

iceberg_or_boat's People

Contributors

jbiloki avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.