CNTK
CNTK copied to clipboard
New EvalWrapper.dll exceptions due to CPUMatrix.cpp updates.
I rebuilt the most recent Release version this morning and retested my own end-to-end code that was working previously and upon executing the following line:
outputs = model.Evaluate(inputs, "ol.z", 4);
the following exception was thown:
A first chance exception of type 'Microsoft.MSR.CNTK.Extensibility.Managed.CNTKInvalidArgumentException' occurred in EvalWrapper.dll
Microsoft.MSR.CNTK.Extensibility.Managed.CNTKInvalidArgumentException: TensorOp: Unary reduction operations other than opSum not yet implemented. at Microsoft.MSR.CNTK.Extensibility.Managed.IEvaluateModelManaged<float>.Evaluate(Dictionary`2 inputs, Dictionary`2 outputs) at
Searching for the following error message "TensorOp: Unary reduction operations other than opSum not yet implemented." I see this is being thrown by the Source/Math/CPUMatrix.cpp
6216 if (reductionOp != ElementWiseOperator::opSum) // TODO: enable the reduction ops
6217 InvalidArgument("TensorOp: Unary reduction operations other than opSum not yet implemented.");
I see @frankseide is making changes to this code and there are other changes to the EvalWrapper.cpp. Is this work-in-progress that will be reconciled in a near-term commit?
As you can see below, this network is not very complicated.
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# currentDirectory=$(SolutionDir)/<path to corresponding data folder>
RootDir = ".."
ConfigDir = "$RootDir$/Config"
DataDir = "$RootDir$/Data"
OutputDir = "$RootDir$/Output"
ModelDir = "$OutputDir$/Models"
# which commands to run
command=Train:Test:Output:dumpNodeInfo
#required...
precision = "float"
modelPath="$OutputDir$/Models/dlt_dnn01.dnn" # where to write the model to
ndlMacros="$ConfigDir$/Macros.ndl"
# uncomment the following line to write logs to a file
# stderr = "$OutputDir$/dtl_dnn01_out"
traceLevel=1
#numMBsToShowResult=500
deviceId=-1 # CPU < 0
inputDimension=24 # input data dimensions
labelDimension=4 # label dimensions
#######################################
# TRAINING CONFIG #
#######################################
Train=[
action="train"
#Network Definition Language
NDLNetworkBuilder=[
networkDescription = "$ConfigDir$/dlt_dnn01.ndl"
]
#Stochastic Gradient Descent
SGD = [
epochSize=0 # =0 means size of the training set
minibatchSize=100
learningRatesPerMB=0.1 # learning rates per MB
momentumPerMB = 0
maxEpochs=25
]
# parameter values for the reader
reader = [
readerType = "CNTKTextFormatReader"
file = "Train-DLT-dnn01.txt"
randomize = "auto"
maxErrors = 10
traceLevel = 1
input = [
features = [
alias = "F"
dim = 24
format = "dense"
]
labels = [
alias = "L"
dim = 4
format = "dense"
]
]
]
]
# macros to include
load = ndlDLTMacros
# the actual NDL that defines the network
run = DNN
ndlDLTMacros = [
featDim = 24
labelDim = 4
features = Input(featDim)
labels = Input(labelDim)
]
DNN = [
# Variables
hiddenDim = 12
# Layer Operations
# DNNSigmoidLayer and DNNLayer are defined in Macros.ndl
h1 = DNNSigmoidLayer(featDim, hiddenDim, features, 1)
ol = DNNLayer(hiddenDim, labelDim, h1, 1)
#Training Criterion
ce = CrossEntropyWithSoftmax(labels, ol)
#Test Objective Function
err = ErrorPrediction(labels, ol)
# Special Nodes
FeatureNodes = (features)
LabelNodes = (labels)
CriterionNodes = (ce)
EvalNodes = (err)
OutputNodes = (ol)
]
Getting different error with updated repo.