# CloudDeploy neural network unknown error

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

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:

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.

• I can confirm that your solution works. – MaxJ Sep 20 '17 at 14:20
• 30-50 seconds is crazy slow – M.R. Sep 21 '17 at 2:13
• @M.R. It's cloud credits not seconds – b3m2a1 Sep 21 '17 at 3:02
• 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. – M.R. Sep 21 '17 at 3:10
• @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. – b3m2a1 Sep 21 '17 at 3:54

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.