You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
at mxnet.csharp.Util.CallCheck(Int32 ret) in F:\Projects\mxnet.csharp\mxnet.csharp\Util.cs:line 81
at mxnet.csharp.Symbol.InferShape(Dictionary2 argShapes, List1 inShape, List1 outShape, List1 auxShape) in F:\Projects\mxnet.csharp\mxnet.csharp\Symbol.cs:line 415
at mxnet.csharp.Symbol.SimpleBind(Context context, Dictionary2 inputShapes, OpReqType gradReq, Dictionary2 typeDict, Dictionary2 group2Ctx) in F:\Projects\mxnet.csharp\mxnet.csharp\Symbol.cs:line 575 at mxnet.csharp.FeedForward.InitPredictor(Dictionary2 inputShapes) in F:\Projects\mxnet.csharp\mxnet.csharp\FeedForward_Predict.cs:line 107
at mxnet.csharp.FeedForward.Predict(IDataIter inputX, Nullable`1 numBatch, Boolean returnData, Boolean reset) in F:\Projects\mxnet.csharp\mxnet.csharp\FeedForward_Predict.cs:line 23
at test.console.Program.TrainTest(String path) in F:\Projects\mxnet.csharp\test.console\Program.cs:line 163
at test.console.Program.Main(String[] args) in F:\Projects\mxnet.csharp\test.console\Program.cs:line 82
What have you tried to solve it?
Tried changing batch size
Minimum reproducible example
int batch_size = 1;
uint size ;
IntPtr array = new IntPtr();
IntPtr strARray ;
NativeMethods.MXListAllOpNames(out size, out strARray);
var pnet = Symbol.Load("Inception-BN-symbol.json");
Context ctx = new Context(DeviceType.KCpu, 0);
Speedometer speed = new Speedometer(batch_size, 50);
DoCheckpoint doCheckpoint = new DoCheckpoint(path);
CustomMetric customMetric = new CustomMetric((l, p) => Accuracy(l, p, batch_size), "Accuracy");
Optimizer optimizer = new CcSgd(momentum: 0.9f, learningRate: 0.001f, wd: 0.00001f, rescaleGrad: 1.0f / batch_size);
FeedForward model = null;
try
{
var modelload = FeedForward.Load(path, ctx: ctx,
numEpoch: 1,
optimizer: optimizer,
initializer: new Xavier(factorType: FactorType.In, magnitude: 2.34f));
model = new FeedForward(pnet, new List<Context> { ctx },
numEpoch: 1,
optimizer: optimizer,
initializer: new Xavier(factorType: FactorType.In, magnitude: 2.34f),
argParams: modelload.ArgParams,
auxParams: modelload.AuxParams
);
}
catch (Exception)
{
// ignored
}
if (model == null)
{
model = new FeedForward(pnet, new List<Context> { ctx },
numEpoch: 1,
optimizer: optimizer,
initializer: new Xavier(factorType: FactorType.In, magnitude: 2.34f)
);
}
ReadData rdpredict = new ReadData("images\\", batch_size, true); //, true);
var testOut = model.Predict(rdpredict, batch_size);
The text was updated successfully, but these errors were encountered:
Any ideas what might cause that error? Intuition about what sort of things I should focus on? I'm getting this error when calling model.Predict
Environment info
Operating System: Windows
Compiler: Visual Studio
Package used (Python/R/Scala/Julia): C#
Error Message:
Error in operator global_pool: [19:16:46] g:\deeplearn\mxnet\src\operator./pooling-inl.h:196: Check failed: param_.kernel[0] <= dshape[2] + 2 * param_.pad[0] kernel size (7) exceeds input (2 padded to 2)
at mxnet.csharp.Util.CallCheck(Int32 ret) in F:\Projects\mxnet.csharp\mxnet.csharp\Util.cs:line 81
at mxnet.csharp.Symbol.InferShape(Dictionary
2 argShapes, List
1 inShape, List1 outShape, List
1 auxShape) in F:\Projects\mxnet.csharp\mxnet.csharp\Symbol.cs:line 415at mxnet.csharp.Symbol.SimpleBind(Context context, Dictionary
2 inputShapes, OpReqType gradReq, Dictionary
2 typeDict, Dictionary2 group2Ctx) in F:\Projects\mxnet.csharp\mxnet.csharp\Symbol.cs:line 575 at mxnet.csharp.FeedForward.InitPredictor(Dictionary
2 inputShapes) in F:\Projects\mxnet.csharp\mxnet.csharp\FeedForward_Predict.cs:line 107at mxnet.csharp.FeedForward.Predict(IDataIter inputX, Nullable`1 numBatch, Boolean returnData, Boolean reset) in F:\Projects\mxnet.csharp\mxnet.csharp\FeedForward_Predict.cs:line 23
at test.console.Program.TrainTest(String path) in F:\Projects\mxnet.csharp\test.console\Program.cs:line 163
at test.console.Program.Main(String[] args) in F:\Projects\mxnet.csharp\test.console\Program.cs:line 82
What have you tried to solve it?
Minimum reproducible example
The text was updated successfully, but these errors were encountered: