Giter Site home page Giter Site logo

keras.jl's Introduction

keras

Build Status

A minimal wrapper around the Keras deep learning library using PyCall with helper utilities for using it from Julia.

Longer term, I'd like this package to follow the model in Tensorflow.jl and define Julia types for each method.

In the meantime, only a few top level modules are explicitly imported. To get something that is not imported, either:

  • Access it using the [:name] syntax: Keras.layers.core[:Dense]
  • Pywrap the part that you want: c = pywrap(Keras.layers.core); c.Dense
  • Pyimport locally (will not be under Keras module, but will have completion): @pyimport keras.layers.core as core; core.Dense. This is equivalent to pywrap

PyCall handles importing docstring from Python, so ?Keras.layers.core[:Dense] will return documentation for Dense.

Setting up with Keras

If Keras is not already installed in the PyCall python environment, consider setting it up with a local miniconda distribution:

using Conda
ENV["PYTHON"] = ""
push!(Conda.CHANNELS, "https://conda.anaconda.org/jaikumarm")

Conda.add("keras")
Conda.add("h5py")
Pkg.build("PyCall")

Passing data into Keras

Keras expects row major arrays, e.g.: (i, j, k, N examples) on Julia side should be converted to (N Examples, k, j, i) on the Python side.

Convert Julia arrays to PyArray objects with the proper dimension ordering using utils in src/utils.jl, specifically to_python_array.

Creating a simple mode

See the examples directory for examples (TODO )= ). For the most part, the Keras docs work equally well, as the API is identical.

Improvements

  • Is there a way to recursively convert the PyObjects to Julia modules instead of having to explicitly (a) create a module for each, or (b) explicitly import as some other name

keras.jl's People

Contributors

dmrd avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

omeryavuz

keras.jl's Issues

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.