Message Boards Message Boards


[NetTrain] Argument System NetSharedArray at position 1

Posted 9 months ago
6 Replies
2 Total Likes

Hi, I'm seeing the following issue when I attempt to train a simple neural network using NetTrain using Mathematica 11.3:

enter image description here

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} = 
  NetTrain[netChain, Rule[trainSetX , trainSetY], All, 
   ValidationSet -> Rule[testSetX,  testSetY], TargetDevice -> "GPU" ]

Is this a bug in NetTrain?

6 Replies

I'm also seeing a similar issue when using Classify using the exact same code from Mathematica documentation:

enter image description here


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"}]

enter image description here

Can you give more info on your system and perform a clean start?



I'm in the process of performing a manual clean. Thus, it's currently Loading from Wolfram Research server and will report back.

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} = 
  NetTrain[netChain, Rule[trainSetX, trainSetY], All, 
   ValidationSet -> Rule[testSetX, testSetY]]

enter image description here

@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".

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract