Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow dynamic axis for operator space_to_depth. #3724

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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