pluskid / Mocha.jl

Deep Learning framework for Julia
Other
1.29k stars 254 forks source link

Things that I really liked about Mocha, and need direction of where to find in MXNet #180

Closed ashleylid closed 8 years ago

ashleylid commented 8 years ago

Switching on the gpu

ENV["MOCHA_USE_CUDA"] = "true"
backend = GPUBackend()
init(backend)

Looping through a text file that lists h5 format

data_layer = AsyncHDF5DataLayer(name="train-data", source=joinpath(data,"train.txt"),
batch_size=10, shuffle=true)

visual description of net saved as png

open("net.dot", "w") do out net2dot(out, net) end
run(pipeline(`dot -Tpng net.dot`, "net.png"))

coffee breaks

setup_coffee_lounge(solver, save_into="$exp_dir/statistics.h5", every_n_iter=50)
add_coffee_break(solver, Snapshot(exp_dir), every_n_iter=500)

Thx

pluskid commented 8 years ago

Hi. see below for some equivalence between Mocha.jl and MXNet.jl:

  1. switching backend: you just replace the mx.cpu() instance you constructed with mx.gpu().
  2. Data provider for HDF5 file has not been implemented. If the data is not too large, you could load them into memory and use Array Data Provider.
  3. Visualization, please check the doc
  4. Coffee breaks, please check the doc for callbacks
ashleylid commented 8 years ago

Thank you! :) Just need to get around my current loading of data which is all in either mat files or hdf5.