-
Returns a view of this tensor with permuted dimensions. Typically the pattern will include the integers 0, 1, ... ndim-1, and any number of‘x’ characters in dimensions where this tensor should be broadcasted.
A few examples of patterns and their effect:
- (‘x’) -> make a 0d (scalar) into a 1d vector
- (0, 1) -> identity for 2d vectors
- (1, 0) -> inverts the first and second dimensions
- (‘x’, 0) -> make a row out of a 1d vector (N to 1xN)
- (0, ‘x’) -> make a column out of a 1d vector (N to Nx1)
- (2, 0, 1) -> AxBxC to CxAxB
- (0, ‘x’, 1) -> AxB to Ax1xB
- (1, ‘x’, 0) -> AxB to Bx1xA
- (1,) -> This remove dimensions 0. It must be a broadcastable dimension (1xA to A)
变换的时候数字分别代表维度,x类似于reshpe中的-1参数,最后分配.
theano dimshuffle的使用说明
最新推荐文章于 2017-08-21 10:01:05 发布