3
$\begingroup$

I tried to use CloudDeploy to put my nicely trained network into the cloud for other people to use. However, after calling the following:

CloudDeploy[FormPage[{"image"->"Image"},Net[#image]&],Permissions->"Public"]

I get an unknown error. Is there a way to deploy neural networks into the cloud at this moment?

The trained net can be found here: https://www.dropbox.com/s/if91qh5ue1v6cj4/TestNet.wlnet?dl=0

Best, Max

$\endgroup$
2
$\begingroup$

There are two possible issues:

  1. You could be hitting a time-out
  2. The definitions aren't exported properly

Try this:

netco = CloudExport[net, "MX", Permissions -> "Public"];

form =
  FormPage[{"img" -> "Image"},
   With[{result = CloudImport[netco][#img]},
     Grid[{
       Keys[result],
       Values[result]
       }]
     ] &
   ];

co = CloudDeploy[form, "net_form", Permissions -> "Public"];

That will solve problem 2 and is generally fast-enough for me. Here's a sample resulting image:

test

I'll leave that one live here until you can confirm it works. Beware that it crushes your cloud credits. Each call takes 30-50 cloud credits for me.

If it's a time-out issue, you may need to use smaller images or a paid account.

$\endgroup$
  • $\begingroup$ I can confirm that your solution works. $\endgroup$ – MaxJ Sep 20 '17 at 14:20
  • $\begingroup$ 30-50 seconds is crazy slow $\endgroup$ – M.R. Sep 21 '17 at 2:13
  • $\begingroup$ @M.R. It's cloud credits not seconds $\endgroup$ – b3m2a1 Sep 21 '17 at 3:02
  • $\begingroup$ Oh nice, we'll I'd like to hear how it works for you in terms of time, throughput and cost - the Wolfram Cloud doesn't have gpus, and when I tried a few months back, calling a net on many or large images crashed the process very quickly. $\endgroup$ – M.R. Sep 21 '17 at 3:10
  • $\begingroup$ @M.R. I put that thing back up. Feel free to try it for yourself. In general a computation aborts if it takes more than like 5 seconds I think, so it's taking less than that. I sent in a 741kb GIF of {320, 239} pixels to get that mess up there. $\endgroup$ – b3m2a1 Sep 21 '17 at 3:54
0
$\begingroup$

Nontrivial convolutional neural networks do not work in the cloud, even if you have the top-tier subscription. I tried really hard to get this to work. The cloud is too flaky and not ready for prime times.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.