diff --git a/Source/CNTKv2LibraryDll/Function.h b/Source/CNTKv2LibraryDll/Function.h index 93a599551886..513dd5b4449d 100644 --- a/Source/CNTKv2LibraryDll/Function.h +++ b/Source/CNTKv2LibraryDll/Function.h @@ -390,7 +390,7 @@ namespace CNTK if (leftOperandShape.SubShape(outputRank) != rightOperandShape.SubShape(0, numReductionAxes)) { InvalidArgument("The %d trailing dimensions of the left operand (%s) do not match the right operand's leading dimensions (%s)", - numReductionAxes, + (int)numReductionAxes, AsString(leftOperandShape.SubShape(outputRank)).c_str(), AsString(rightOperandShape).c_str()); } diff --git a/Tests/UnitTests/V2LibraryTests/Seq2Seq.cpp b/Tests/UnitTests/V2LibraryTests/Seq2Seq.cpp index e561a76864a5..37223a9ab0aa 100644 --- a/Tests/UnitTests/V2LibraryTests/Seq2Seq.cpp +++ b/Tests/UnitTests/V2LibraryTests/Seq2Seq.cpp @@ -99,7 +99,7 @@ void TrainSequenceToSequenceTranslator(const DeviceDescriptor& device, bool useS auto decoderOutputH = Stabilize(decoderInput, device); FunctionPtr decoderOutputC; - auto pastValueRecurrenceHookWithBeamSearchReordering = [addBeamSearchReorderingHook, beamSearchReorderHook](const Variable& operand) { + auto pastValueRecurrenceHookWithBeamSearchReordering = [addBeamSearchReorderingHook, beamSearchReorderHook](const FunctionPtr& operand) { return PastValue(addBeamSearchReorderingHook ? Times(operand, beamSearchReorderHook) : operand); }; @@ -114,11 +114,11 @@ void TrainSequenceToSequenceTranslator(const DeviceDescriptor& device, bool useS else { auto isFirst = Sequence::IsFirst(labelEmbedding); - recurrenceHookH = [labelEmbedding, thoughtVectorBroadcastH, isFirst, addBeamSearchReorderingHook, beamSearchReorderHook](const Variable& operand) { + recurrenceHookH = [labelEmbedding, thoughtVectorBroadcastH, isFirst, addBeamSearchReorderingHook, beamSearchReorderHook](const FunctionPtr& operand) { return ElementSelect(isFirst, thoughtVectorBroadcastH, PastValue(addBeamSearchReorderingHook ? Times(operand, beamSearchReorderHook) : operand)); }; - recurrenceHookC = [labelEmbedding, thoughtVectorBroadcastC, isFirst, addBeamSearchReorderingHook, beamSearchReorderHook](const Variable& operand) { + recurrenceHookC = [labelEmbedding, thoughtVectorBroadcastC, isFirst, addBeamSearchReorderingHook, beamSearchReorderHook](const FunctionPtr& operand) { return ElementSelect(isFirst, thoughtVectorBroadcastC, PastValue(addBeamSearchReorderingHook ? Times(operand, beamSearchReorderHook) : operand)); }; }