Skip to content

Commit

Permalink
Integrate 5925ae7 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Project Philly committed Feb 23, 2016
2 parents 4c8c076 + 5925ae7 commit afbdff1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion Source/CNTK/NetworkDescriptionLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ NDLPass& operator++(NDLPass& ndlPass)
// string1 - [in,out] string to compare, if comparision is equal and at least half the full node name will replace with full node name
// allowUndeterminedVariable - [out] set to true if undetermined variables (symbols yet to be defined) are allowed here
// return - true if function name found
template <typename ElemType>
bool CheckFunction(std::string& p_nodeType, bool* allowUndeterminedVariable)
{
if (allowUndeterminedVariable)
Expand Down
7 changes: 3 additions & 4 deletions Source/CNTK/NetworkDescriptionLanguage.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ bool EqualInsensitive(std::wstring& string1, const std::wstring& string2, const
// string1 - [in,out] string to compare, if comparision is equal and at least half the full node name will replace with full node name
// allowUndeterminedVariable - [out] set to true if undetermined variables (symbols yet to be defined) are allowed here
// return - true if function name found
template <typename ElemType>
bool CheckFunction(std::string& p_nodeType, bool* allowUndeterminedVariable = nullptr);

// NDLType - Network Description Language node type
Expand Down Expand Up @@ -520,7 +519,7 @@ class NDLScript : public ConfigParser
std::string functionName = param;
// check for function name, a function may have two valid names
// in which case 'functionName' will get the default node name returned
if (CheckFunction<ElemType>(functionName))
if (CheckFunction(functionName))
{
RuntimeError("NDLScript: Macro %s includes a parameter %s, which is also the name of a function. Parameter names may not be the same as function names.", macroName.c_str(), param.c_str());
}
Expand Down Expand Up @@ -791,7 +790,7 @@ class NDLScript : public ConfigParser
std::string functionName = name;
// check for function name, a function may have two valid names
// in which case 'functionName' will get the default node name returned
if (CheckFunction<ElemType>(functionName))
if (CheckFunction(functionName))
{
NDLNode<ElemType>* ndlNode = new NDLNode<ElemType>("", functionName, this, ndlTypeFunction);
return ndlNode;
Expand Down Expand Up @@ -1013,7 +1012,7 @@ class NDLScript : public ConfigParser

// check to make sure variable name isn't a valid function name as well
string strTemp = key;
if (CheckFunction<ElemType>(strTemp))
if (CheckFunction(strTemp))
RuntimeError("variable %s is invalid, it is reserved because it is also the name of a function", key.c_str());

tokenStart = keyEnd;
Expand Down
2 changes: 1 addition & 1 deletion Source/Readers/ImageReader/ImageDataDeserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ ImageDataDeserializer::ImageDataDeserializer(const ConfigParameters& config)
}
else
{
RuntimeError("Unsupported label element type '%d'.", label->m_elementType);
RuntimeError("Unsupported label element type '%d'.", (int)label->m_elementType);
}

CreateSequenceDescriptions(configHelper.GetMapPath(), labelDimension);
Expand Down
2 changes: 1 addition & 1 deletion Source/Readers/ReaderLib/ReaderShim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void ReaderShim<ElemType>::Init(const ConfigParameters& config)
}

template <class ElemType>
void ReaderShim<ElemType>::StartMinibatchLoop(size_t mbSize, size_t epoch, size_t requestedEpochSamples = requestDataSize)
void ReaderShim<ElemType>::StartMinibatchLoop(size_t mbSize, size_t epoch, size_t requestedEpochSamples)
{
return StartDistributedMinibatchLoop(mbSize, epoch, 0, 1, requestedEpochSamples);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Readers/ReaderLib/ReaderShim.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ReaderShim : public IDataReader<ElemType>
delete this;
}

virtual void StartMinibatchLoop(size_t mbSize, size_t epoch, size_t requestedEpochSamples) override;
virtual void StartMinibatchLoop(size_t mbSize, size_t epoch, size_t requestedEpochSamples = requestDataSize) override;
virtual void StartDistributedMinibatchLoop(size_t requestedMBSize, size_t epoch, size_t subsetNum, size_t numSubsets, size_t requestedEpochSamples) override;

virtual bool SupportsDistributedMBRead() const override
Expand Down
2 changes: 1 addition & 1 deletion Source/Readers/ReaderLib/SampleModePacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void SampleModePacker::CopySequenceToBuffer(size_t sampleIndex, size_t streamInd
}
else
{
RuntimeError("Storage type %d is not supported.", m_inputStreams[streamIndex]->m_storageType);
RuntimeError("Storage type %d is not supported.", (int)m_inputStreams[streamIndex]->m_storageType);
}
}

Expand Down

0 comments on commit afbdff1

Please sign in to comment.