conradwt
(Conrad Taylor)
March 25, 2018, 11:37pm
1
Hi, I’m seeing the following issue when I attempt to train a simple neural network using NetTrain using Mathematica 11.3:
Here’s the general structure of the code:
layer1 = NetInitialize@LinearLayer[12888, "Input" -> 12888]
layer2 = ElementwiseLayer[LogisticSigmoid]
layer3 = SummationLayer[]
layers = { layer1, layer2 , layer3}
netChain = NetChain[ layers]
{time, trained} =
AbsoluteTiming@
NetTrain[netChain, Rule[trainSetX , trainSetY], All,
ValidationSet -> Rule[testSetX, testSetY], TargetDevice -> "GPU" ]
Is this a bug in NetTrain?
conradwt
(Conrad Taylor)
March 25, 2018, 11:41pm
2
I’m also seeing a similar issue when using Classify using the exact same code from Mathematica documentation:
mthiel
(Marco Thiel)
March 26, 2018, 12:27am
3
Hi,
I cannot reproduce that. It seems to work fine on my machine (OSX High Sierra, MMA 11.3).
c = Classify[{{1.5, Blue} -> "A", {3.2, Blue} -> "A", {4.1, Red} -> "B", {5.3, Red} -> "B", {10., Green} -> "C", {12.4, Red} -> "C"}]
Can you give more info on your system and perform a clean start ?
Cheers,
Marco
conradwt
(Conrad Taylor)
March 26, 2018, 12:55am
4
I’m in the process of performing a manual clean. Thus, it’s currently Loading from Wolfram Research server and will report back.
conradwt
(Conrad Taylor)
March 26, 2018, 1:08am
5
After performing the manual clean start, I’m seeing the same issue with NetTrain but Classify seems to be working without issue. Next, I’m using MMA 11.3 on macOS 10.13.3 (High Sierra).
Hi,Conrad, NetTrain work well without GPU.
I’m sorry I don’t have GPU in my PC.
trainSetX = Table[RandomReal[1, 12888], {5}];
trainSetY = Table[RandomReal[], {5}];
testSetX = Table[RandomReal[1, 12888], {1}];
testSetY = Table[RandomReal[], {1}];
layer1 = NetInitialize@LinearLayer[12888, "Input" -> 12888];
layer2 = ElementwiseLayer[LogisticSigmoid];
layer3 = SummationLayer[];
layers = {layer1, layer2, layer3};
netChain = NetChain[layers];
{time, trained} =
AbsoluteTiming@
NetTrain[netChain, Rule[trainSetX, trainSetY], All,
ValidationSet -> Rule[testSetX, testSetY]]
conradwt
(Conrad Taylor)
March 26, 2018, 4:53am
7
@Kotaro Okazaki Your example works as expected and thank you for that because it allowed me to determine that root cause appears to be an issue with TargetDevice → “GPU” silently failing. My original code works fine without TargetDevice → “GPU” or with TargetDevice → “CPU” .