forked from elixir-nx/axon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
85 lines (76 loc) · 2.87 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
defmodule Axon.MixProject do
use Mix.Project
@source_url "https://github.com/elixir-nx/axon"
@version "0.1.0-dev"
def project do
[
app: :axon,
version: @version,
name: "Axon",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:nx, "~> 0.1.0-dev", nx_opts()},
{:ex_doc, "~> 0.23", only: :dev, runtime: false},
{:table_rex, "~> 3.1.1"}
]
end
defp nx_opts do
if path = System.get_env("AXON_NX_PATH") do
[path: path, override: true]
else
[github: "elixir-nx/nx", sparse: "nx", override: true]
end
end
defp docs do
[
main: "Axon",
source_ref: "v#{@version}",
source_url: @source_url,
groups_for_functions: [
# Axon
"Layers: Special": &(&1[:type] == :special),
"Layers: Activation": &(&1[:type] == :activation),
"Layers: Linear": &(&1[:type] == :linear),
"Layers: Convolution": &(&1[:type] == :convolution),
"Layers: Dropout": &(&1[:type] == :dropout),
"Layers: Pooling": &(&1[:type] == :pooling),
"Layers: Normalization": &(&1[:type] == :normalization),
"Layers: Recurrent": &(&1[:type] == :recurrent),
"Layers: Composition": &(&1[:type] == :composition),
"Layers: Shape": &(&1[:type] == :shape),
"Model: Compilation": &(&1[:type] == :compilation),
"Model: Execution": &(&1[:type] == :execution),
# Axon.Layers
"Functions: Attention": &(&1[:type] == :attention),
"Functions: Convolutional": &(&1[:type] == :convolutional),
"Functions: Dropout": &(&1[:type] == :dropout),
"Functions: Linear": &(&1[:type] == :linear),
"Functions: Normalization": &(&1[:type] == :normalization),
"Functions: Pooling": &(&1[:type] == :pooling)
],
before_closing_body_tag: &before_closing_body_tag/1
]
end
defp before_closing_body_tag(:html) do
"""
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-t5CR+zwDAROtph0PXGte6ia8heboACF9R5l/DiY+WZ3P2lxNgvJkQk5n7GPvLMYw" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-FaFLTlohFghEIZkw6VGwmf9ISTubWAVYW8tG8+w2LAIftJEULZABrF9PPFv+tVkH" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-bHBqxz8fokvgoJ/sc17HODNxa42TlaEhB+w8ZJXTc2nZf1VgEaFZeZvT4Mznfz0v" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
"""
end
defp before_closing_body_tag(_), do: ""
end