Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwangzw committed Dec 10, 2016
1 parent e2fb810 commit 4126a4b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
4 changes: 2 additions & 2 deletions CNTK.Cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

<HasMultiverso>false</HasMultiverso>
<HasMultiverso Condition="Exists('$(SolutionDir)\Source\Multiverso\include\multiverso')">true</HasMultiverso>
<HasSwig>false</HasSwig>

<HasSwig>false</HasSwig>
<HasSwig Condition="Exists('$(SWIG_PATH)\swig.exe')">true</HasSwig>

</PropertyGroup>
Expand Down
10 changes: 3 additions & 7 deletions Source/CNTKv2LibraryDll/API/CNTKLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,6 @@ namespace CNTK
return prefix + std::to_wstring(Internal::NewUniqueId());
}


inline std::wstring GenerateUid(VariableKind varKind)
{
return GenerateUid(std::wstring(VariableKindName(varKind)));
Expand Down Expand Up @@ -1821,9 +1820,9 @@ namespace CNTK
#endif

protected:
static const size_t s_serializationVersion = 1;

VariableFieldsPtr m_dataFields;

static const size_t s_serializationVersion = 1;
};

// TODO: Variable equality should be based on uids.
Expand Down Expand Up @@ -2146,7 +2145,6 @@ namespace std {
}
};


// TODO: Variable hash should be based on uid.
template <> struct hash<::CNTK::Variable>
{
Expand Down Expand Up @@ -2271,8 +2269,7 @@ namespace CNTK
virtual void Backward(const BackPropStatePtr& state,
const std::unordered_map<Variable, ValuePtr>& rootGradientValues,
std::unordered_map<Variable, ValuePtr>& backPropagatedGradientValuesForInputs) = 0;



///
/// Returns the name of the operation that this Function denotes
///
Expand Down Expand Up @@ -2472,7 +2469,6 @@ namespace CNTK
// Disallow copy and move construction and assignment
Function(const Function&) = delete; Function(Function&&) = delete; Function& operator=(const Function&) = delete; Function& operator=(Function&&) = delete;


protected:
///
/// Protected constructor for derived 'Function' types to specify the actual input and output variables for the (primitive) Function instance.
Expand Down
2 changes: 1 addition & 1 deletion Source/CNTKv2LibraryDll/API/CNTKLibraryInternals.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ namespace CNTK

// This is meant for debugging purposes only and is very likely to be deprecated in the future.
CNTK_API void SaveAsLegacyModel(const FunctionPtr& rootFunction, const std::wstring& modelFile);

CNTK_API size_t NewUniqueId();

// Internal hooks for testing and higher-level bindings
Expand Down Expand Up @@ -253,6 +254,5 @@ namespace CNTK
CNTK_API bool AreEqual(const ::CNTK::NDArrayView& view1, const ::CNTK::NDArrayView& view2, double relativeTolerance = 0.0, double absoluteTolerance = 0.0);

class VariableResolver;

}
}
12 changes: 0 additions & 12 deletions bindings/csharp/CSEvalV2Library/ValueExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ public static void CopyTo<T>(this Value value, Variable variable, List<List<T>>
throw new ArgumentException("The variable and value does not have same shape.");
}

//if (variableShape.Rank != valueShape.Rank - 2)
//{
// throw new ArgumentException("The variable and value does not have same shape.");
//}
//for (uint i = 0; i < variableShape.Rank; i++)
//{
// if (variableShape.GetDimensionSize(i) != valueShape.GetDimensionSize(i))
// {
// throw new ArgumentException("The shape ranks of varaible and value does not match.");
// }
//}

// Todo: transform sparse to dense
// Currently only for dense
if ((value.GetStorageFormat() != StorageFormat.Dense))
Expand Down

0 comments on commit 4126a4b

Please sign in to comment.