Skip to content

Instantly share code, notes, and snippets.

View marceloreichert's full-sized avatar

Marcelo Reichert marceloreichert

View GitHub Profile
@marceloreichert
marceloreichert / network.ex
Created October 4, 2019 00:25
Elixir and Reinforcement Learning - IV
defmodule AutonomousCar.NeuralNetwork.Network do
alias AutonomousCar.NeuralNetwork.{Layer, Network, Neuron}
alias AutonomousCar.Math.Activation
defstruct pid: nil, input_layer: nil, hidden_layers: [], output_layer: nil, error: 0
def start_link(layer_sizes \\ []) do
{:ok, pid} = Agent.start_link(fn -> %Network{} end)
layers =
defmodule TaggingImage do
require Axon
require Logger
alias Tagging.Preprocessing
alias Tagging.Postprocessing
alias Evision, as: OpenCV
EXLA.set_preferred_defn_options([:tpu, :cuda, :rocm, :host])