# Get ImageRestyle neural network runtime in Mathematica 12?

**URL:** <https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920>\
**Category:** Questions\
**Tags:** data-science, image-processing, mathematica, external-interfaces, machine-learning, neural-networks\
**Created:** [April 17, 2019, 7:49pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920 "2019-04-17T19:49:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lvveen](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lvveen/32/4003_2.png) [@lvveen](https://community.wolfram.com/u/lvveen)\
**Post date:** [April 17, 2019, 7:49pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/1 "2019-04-17T19:49:31Z")

</div>

Hi,  
Playing with Mathematica 12 and ImageRestyle and the system generates an error message:  
The neural network is unavailabe. With MM11.3 it has always worked.  
Stacktrace shows:  
ImageRestyle::nnlibunavail  
Running Windows 10

As a comment, before the imagerestyle started it first downloaded the GPU libraries. That was 900MB!  
After the download Mathematica showed a message that a restart was needed. After the restart the message above was generated.

---

<div class="post-metadata">

**Author:** ![stefanr](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/stefanr/32/2775_2.png) [@stefanr](https://community.wolfram.com/u/stefanr)\
**Post date:** [April 17, 2019, 9:37pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/2 "2019-04-17T21:37:38Z")

</div>

To clarify, are you trying to use `ImageRestyle` with `TargetDevice->"GPU"`? If so, can you make sure you have the latest drivers for your GPU installed? M12.0 requires newer drivers than M11.3.0.

---

<div class="post-metadata">

**Author:** ![lvveen](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lvveen/32/4003_2.png) [@lvveen](https://community.wolfram.com/u/lvveen)\
**Post date:** [April 18, 2019, 7:41am UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/3 "2019-04-18T07:41:34Z")

</div>

Hi Stefan,  
That is true. I want/need to use the GPU option!  
I updated the NVidea driver to the latest hardware vendor supported version and that didn’t help.  
Next I used the NVidea website to locate the latest and installed these.  
I updated the CUDA paclets but it still doesn’t work.  
The error message has changed though.  
Any next suggestions or information needed?

 ![errormm12nvidea.JPG](https://global.discourse-cdn.com/wolfram/original/2X/2/2de3323320ec35aebba388388af2d6f38132951e.jpeg)

```
CUDAResourcesInstall[Update -> True]

```

Out[2]= {  
PacletManager`Paclet[  
“Name” → “CUDAResources”, “Version” → “12.0.359”,  
“MathematicaVersion” → “12.0”,  
“Description” → “{ToolkitVersion → v10.1, MinimumDriver → 290}”,  
“SystemID” → {“Windows-x86-64”}, “Qualifier” → “Win64”,  
“Extensions” → {{  
“Resource”,  
“Resources” → {  
“CUDAToolkit”, “ExampleData”, “LibraryResources”}}},  
“Location” → “C:\Users\lvveen\AppData\Roaming\Mathematica\  
Paclets\Repository\CUDAResources-Win64-12.0.359”]}

```
CUDADriverVersion[]

```

Out[4]= “425.31”

```
CUDAInformation[]

```

Out[5]= {1 → {“Name” → “Quadro M1000M”, “Clock Rate” → 1071500,  
“Compute Capabilities” → 5., “GPU Overlap” → 1,  
“Maximum Block Dimensions” → {1024, 1024, 64},  
“Maximum Grid Dimensions” → {2147483647, 65535, 65535},  
“Maximum Threads Per Block” → 1024,  
“Maximum Shared Memory Per Block” → 49152,  
“Total Constant Memory” → 65536, “Warp Size” → 32,  
“Maximum Pitch” → 2147483647,  
“Maximum Registers Per Block” → 65536, “Texture Alignment” → 512,  
“Multiprocessor Count” → 4, “Core Count” → 128,  
“Execution Timeout” → 1, “Integrated” → False,  
“Can Map Host Memory” → True, “Compute Mode” → “Default”,  
“Texture1D Width” → 65536, “Texture2D Width” → 65536,  
“Texture2D Height” → 65536, “Texture3D Width” → 4096,  
“Texture3D Height” → 4096, “Texture3D Depth” → 4096,  
“Texture2D Array Width” → 16384,  
“Texture2D Array Height” → 16384,  
“Texture2D Array Slices” → 2048, “Surface Alignment” → 512,  
“Concurrent Kernels” → True, “ECC Enabled” → False,  
“TCC Enabled” → False, “Total Memory” → 2147483648}}

---

<div class="post-metadata">

**Author:** ![lvveen](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lvveen/32/4003_2.png) [@lvveen](https://community.wolfram.com/u/lvveen)\
**Post date:** [April 18, 2019, 2:51pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/4 "2019-04-18T14:51:07Z")

</div>

Hi Stefan,  
That is true. I want/need to use the GPU option!  
I updated the NVidea driver to the latest hardware vendor supported version and that didn’t help.  
Next I used the NVidea website to locate the latest and installed these.  
I updated the CUDA paclets but it still doesn’t work.  
The error message has changed though.  
Any next suggestions or information needed?

 ![errormm12nvidea.JPG](https://global.discourse-cdn.com/wolfram/original/2X/2/2de3323320ec35aebba388388af2d6f38132951e.jpeg)

```
CUDAResourcesInstall[Update -> True]

```

Out[2]= {  
PacletManager`Paclet[  
“Name” → “CUDAResources”, “Version” → “12.0.359”,  
“MathematicaVersion” → “12.0”,  
“Description” → “{ToolkitVersion → v10.1, MinimumDriver → 290}”,  
“SystemID” → {“Windows-x86-64”}, “Qualifier” → “Win64”,  
“Extensions” → {{  
“Resource”,  
“Resources” → {  
“CUDAToolkit”, “ExampleData”, “LibraryResources”}}},  
“Location” → “C:\Users\lvveen\AppData\Roaming\Mathematica\  
Paclets\Repository\CUDAResources-Win64-12.0.359”]}

```
CUDADriverVersion[]

```

Out[4]= “425.31”

```
CUDAInformation[]

```

Out[5]= {1 → {“Name” → “Quadro M1000M”, “Clock Rate” → 1071500,  
“Compute Capabilities” → 5., “GPU Overlap” → 1,  
“Maximum Block Dimensions” → {1024, 1024, 64},  
“Maximum Grid Dimensions” → {2147483647, 65535, 65535},  
“Maximum Threads Per Block” → 1024,  
“Maximum Shared Memory Per Block” → 49152,  
“Total Constant Memory” → 65536, “Warp Size” → 32,  
“Maximum Pitch” → 2147483647,  
“Maximum Registers Per Block” → 65536, “Texture Alignment” → 512,  
“Multiprocessor Count” → 4, “Core Count” → 128,  
“Execution Timeout” → 1, “Integrated” → False,  
“Can Map Host Memory” → True, “Compute Mode” → “Default”,  
“Texture1D Width” → 65536, “Texture2D Width” → 65536,  
“Texture2D Height” → 65536, “Texture3D Width” → 4096,  
“Texture3D Height” → 4096, “Texture3D Depth” → 4096,  
“Texture2D Array Width” → 16384,  
“Texture2D Array Height” → 16384,  
“Texture2D Array Slices” → 2048, “Surface Alignment” → 512,  
“Concurrent Kernels” → True, “ECC Enabled” → False,  
“TCC Enabled” → False, “Total Memory” → 2147483648}}

---

<div class="post-metadata">

**Author:** ![lvveen](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lvveen/32/4003_2.png) [@lvveen](https://community.wolfram.com/u/lvveen)\
**Post date:** [April 18, 2019, 3:04pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/5 "2019-04-18T15:04:02Z")

</div>

So at the end I got it working.  
I removed all 11.x versions an deleted the wolfram and mathematica directories in the  
C:\Users\lvveen\AppData\Roaming directory.

After re-install I received an installation error:

 ![errormm12install.JPG](https://global.discourse-cdn.com/wolfram/original/2X/6/60406109ed576b8609917eb1442bb9cdb18045ab.jpeg)

I decided to ignore it and move on..

I went to the ImageRestyle documentation and started the example  
Then it started to reload the GPU libraries

 ![errormm12downloadlib.JPG](https://global.discourse-cdn.com/wolfram/original/3X/f/4/f4b2950eae3a59db4403dacbbc8e289ca7f15ae8.jpeg)

After this a restart was asked:

 ![errormm12needrestart.JPG](https://global.discourse-cdn.com/wolfram/original/2X/1/168551d466579ef38fd8be55670445bc55ab7402.jpeg)

After the restart back on the page and a download was started again (this did not happen with previous installs)

 ![errormm12downloadcontent2.JPG](https://global.discourse-cdn.com/wolfram/original/2X/d/dc6555043555752f3b38662a3013798b2e80d67a.jpeg)

Now it works for ImageRestyle:

 ![mmerrorworks.JPG](https://global.discourse-cdn.com/wolfram/original/3X/a/b/ab510069965325a25e045acc4e5addd35c23af71.jpeg)

and also for NetTrain:

 ![errornettrain2.JPG](https://global.discourse-cdn.com/wolfram/original/3X/6/1/61cda8b0d2aa9456529b0929bde09b20e7d57b10.jpeg)

I’m still a bit worried about the install error message but it seems to have no effect. Would love to hear if this is indeed save to ignore or not.

---

<div class="post-metadata">

**Author:** ![stefanr](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/stefanr/32/2775_2.png) [@stefanr](https://community.wolfram.com/u/stefanr)\
**Post date:** [April 18, 2019, 3:11pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/6 "2019-04-18T15:11:47Z")

</div>

> After the restart back on the page and a download was started again (this did not happen with previous installs)

There it is downloading the neural network that `ImageRestyle` uses. This should only happen once.

I’ve never seen that kind of installation warning before, I’ll ask around if anyone knows what it means…

---

<div class="post-metadata">

**Author:** ![carlosy](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@carlosy](https://community.wolfram.com/u/carlosy)\
**Post date:** [April 18, 2019, 3:21pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/7 "2019-04-18T15:21:24Z")

</div>

> After re-install I received an installation error:

Regarding this particular error this it may indicate a permission/firewall problem. I’d suggest rebooting first and trying the installation again otherwise make sure you have admin privileges and/or any firewall settings aren’t blocking this.

---

<div class="post-metadata">

**Author:** ![lvveen](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/lvveen/32/4003_2.png) [@lvveen](https://community.wolfram.com/u/lvveen)\
**Post date:** [April 18, 2019, 3:57pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/8 "2019-04-18T15:57:41Z")

</div>

Hi Carlos, Oke thanks.  
Trying the installation again is not working and I did the install in Admin mode.  
So might be a firewall issue. Not looking forward to re-install again.. Any idea if this might cause problems? The installation gave the possibility to ignore it so I assume it not being a critical thing to solve. Thx!

---

<div class="post-metadata">

**Author:** ![carlosy](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@carlosy](https://community.wolfram.com/u/carlosy)\
**Post date:** [April 22, 2019, 7:04pm UTC](https://community.wolfram.com/t/get-imagerestyle-neural-network-runtime-in-mathematica-12/13920/9 "2019-04-22T19:04:02Z")

</div>

This particular key probably won’t cause a problem but if it does feel free to reach out once again. However, it is due to some security/firewall feature enabled on your machine that is most likely the culprit.
