Group Abstract Group Abstract

Message Boards Message Boards

[NetTrain] Argument System NetSharedArray at position 1

Posted 7 years ago

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

Is this a bug in NetTrain?

POSTED BY: Conrad Taylor
6 Replies

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

enter image description here

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

Cheers,

Marco

POSTED BY: Marco Thiel

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

POSTED BY: Conrad Taylor
POSTED BY: Conrad Taylor

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

enter image description here

POSTED BY: Kotaro Okazaki

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

POSTED BY: Conrad Taylor

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

enter image description here

POSTED BY: Conrad Taylor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard