-
Notifications
You must be signed in to change notification settings - Fork 249
4D tensor -> ND tensor (for layers) #21
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n channel dimension)
pluskid
added a commit
that referenced
this pull request
Dec 19, 2014
4D tensor -> ND tensor (for layers)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a working-in-progress PR that upgrade Mocha's 4D-tensor to general ND-tensor.
ReshapeLayer
explicitly specify the newwidth
,height
, andchannels
, but now we need to specify a general target dimensionBehavior changes for existing layers
HDF5DataLayer
,MemoryDataLayer
,HDF5OutputLayer
: support general ND tensor datasets. The last dimension is treated asnum
dimension, and split for mini-batch.ConcatLayer
: supports general ND tensor and could concat along any dimension.CropLayer
: requires the input to be 4D tensor, as crop layer is designed specific for image data.DropoutLayer
,SplitLayer
: supports general ND tensor out of the box.ElementwiseLayer
,PowerLayer
: support general ND tensor.InnerProductLayer
: supports general ND tensor. For tensor withndims
tensor dimension, the firstndims-1
dimensions are "collapsed" to form the input feature dimension. The output is now 2D tensor (output-dim x mini-batch
) instead of 4D tensor.ConvolutionLayer
,PoolingLayer
: requires the input to be 4D tensor due to the current implementation.ReshapeLayer
: is now more useful to deal with some layers that has special requirement for the tensor dimensions.ArgmaxLayer
,SoftmaxLayer
,MultinomialLogisitcLayer
,SoftmaxLossLayer
,AccuracyLayer
: all of them rely on the concept of the channel dimension.LRNLayer
: require the input to be 4D tensor for now.ChannelPooling
: require the input to be 4D tensor for now. Could possibly be modified to do 1-dimensional pooling along any user-specified tensor dimension.Related Issues (will be addressed in other PRs)