Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working on developer ergonomics #38

Open
ityonemo opened this issue Sep 3, 2019 · 0 comments
Open

working on developer ergonomics #38

ityonemo opened this issue Sep 3, 2019 · 0 comments

Comments

@ityonemo
Copy link

ityonemo commented Sep 3, 2019

I'm leaving this issue here to notate that there's some work being done in an experimental branch of annex.

A few things that Jason and I talked about @ elixirconf:

  • can we convert the operational semantic into the "pipe".
  • how to make functions represent (potentially mutable) weights
  • what is the right semantic to communicate and/or patch in computational interfaces, e.g. SIMD, GPU,

A few things that I think are very important for deep learning operator ergonomics

  • reifying the concepts of minibatches and batches into the language structure. It's a common problem that corner cases in your pipeline (e.g. batches that have the wrong size because the number of valid samples is wrong, corrupt one-off images, etc.) result in VM crash in Python, Julia, etc. which kills the VM and can potentially make you lose progress. This is infuriating because you "won't know till you've hit it", so if we can bake some of these things into the type system we might be able to get some wins.

Hypothetical code (xor problem, neural transfer):

# these layers are not going to change.
fully_connected_1 = Annex.hydrate("fully_connected.dat", immutable: true)
relu_layer = Annex.new(Annex.Layers.Relu, nodes: 8)

# so let's group them into the transfer component
def evaluate_front_end(data) do
  data
  |> fully_connected_1.()
  |> relu_layer.()
end

# we're only going to train the following layer:
penultimate_layer = Annex.new(Annex.Layers.FullyConnected, input: 8, output: 2)
eval_layer = Annex.new(Annex.Layers.SoftMax, nodes: 2)

[_, newly_trained, _] = Annex.train([&evaluate_front_end/1, penultimate_layer, eval_layer], dataset, cost_function, training_algorithm)

better_result = some_data
|> evaluate_front_end
|> newly_trained
|> eval_layer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant