tmariaz

tmariaz

Image Classification looks like hanged

Just deployed the @kip https://hex.pm/packages/image in the staging server.

While testing the Image.Classification.classify hangs. Tried the followed command locally and staging server.

Staging - Ubuntu:

iex> predictions  = Image.Classification.classify(image)

Any idea what is going on? I work like a breeze locally…

Locally:

iex(8)> predictions = Image.Classification.classify(image)
%{
  predictions: [
    %{label: "cheetah, chetah, Acinonyx jubatus", score: 0.9999818801879883},
    %{
      label: "jaguar, panther, Panthera onca, Felis onca",
      score: 1.4970299844208057e-6
    },
    %{label: "leopard, Panthera pardus", score: 5.347766318664071e-7},
    %{label: "gazelle", score: 2.296157504133589e-7},
    %{
      label: "snow leopard, ounce, Panthera uncia",
      score: 1.9233111459016072e-7
    }
  ]
}

Marked As Solved

kip

kip

ex_cldr Core Team

Sounds like the Nx is running on the default binary backend which is native Elixir and very slow. Check your config.exs has:

config :nx,
  default_backend: EXLA.Backend

Also Liked

tmariaz

tmariaz

Awesome it works now. thanks

I’ve added it to the runtime.exs. I think it should be fine there I suppose or it has to be in config.exs?

Last Post!

tmariaz

tmariaz

Sure… thanks :slight_smile:

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement