forked from elixir-nx/scholar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add convergence check to AffinityPropagation (elixir-nx#195)
- Loading branch information
1 parent
4c76bf3
commit e1fbee6
Showing
39 changed files
with
1,901 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# mix run benchmarks/kd_tree.exs | ||
Nx.global_default_backend(EXLA.Backend) | ||
Nx.Defn.global_default_options(compiler: EXLA) | ||
|
||
key = Nx.Random.key(System.os_time()) | ||
{uniform, _new_key} = Nx.Random.uniform(key, shape: {1000, 3}) | ||
|
||
Benchee.run( | ||
%{ | ||
"unbounded" => fn -> Scholar.Neighbors.KDTree.unbounded(uniform) end, | ||
"bounded" => fn -> Scholar.Neighbors.KDTree.bounded(uniform, 2) end | ||
}, | ||
time: 10, | ||
memory_time: 2 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.