Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/CNTKv2LibraryDll/Function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ namespace CNTK
NDShape inputShape = input.Shape();
if (inputShape.Rank() != 3)
LogicError("SpaceToDepth: Input operand (shape: %S) must be a 3-dimensional tensor, e.g. a 2D image with channels.", inputShape.AsString().c_str());
if ((inputShape[0] % blockSize != 0) || (inputShape[1] % blockSize != 0))
if ((inputShape[0] % blockSize != 0 && inputShape[0] != NDShape::FreeDimension) || (inputShape[1] % blockSize != 0 && inputShape[1] != NDShape::FreeDimension))
LogicError("SpaceToDepth: All spatial dimensions in the operand (%zu x %zu) must be divisible by blocksize (%zu).", inputShape[0], inputShape[1], blockSize);
}

Expand Down