本文整理了Java中org.nd4j.linalg.factory.Nd4j.getComplexStrides()
方法的一些代码示例,展示了Nd4j.getComplexStrides()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nd4j.getComplexStrides()
方法的具体详情如下:
包路径:org.nd4j.linalg.factory.Nd4j
类名称:Nd4j
方法名:getComplexStrides
[英]Get the strides based on the shape and NDArrays.order()
[中]根据形状和路线获得步幅。订单()
代码示例来源:origin: deeplearning4j/nd4j
/**
* Create an ndarray from the specified slices
* and the given shape
*
* @param slices the slices of the ndarray
* @param shape the final shape of the ndarray
* @param ordering the ordering of the ndarray
*/
public BaseComplexNDArray(List<IComplexNDArray> slices, int[] shape, char ordering) {
this(slices, shape, Nd4j.getComplexStrides(shape, ordering), ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Create this ndarray with the given data and shape and 0 offset
*
* @param data the data to use
* @param shape the shape of the ndarray
* @param ordering
*/
public BaseComplexNDArray(float[] data, int[] shape, char ordering) {
this(data, shape, Nd4j.getComplexStrides(shape, ordering), 0, ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
*
* @param data
* @param shape
* @param offset
* @param ordering
*/
public BaseComplexNDArray(IComplexNumber[] data, int[] shape, long offset, char ordering) {
this(data, shape, Nd4j.getComplexStrides(shape), offset, ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
*
* @param buffer
* @param shape
* @param offset
* @param ordering
*/
public BaseComplexNDArray(DataBuffer buffer, int[] shape, long offset, char ordering) {
this(buffer, shape, Nd4j.getComplexStrides(shape), offset, ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
@Override
protected int[] getStrides(int[] shape, char ordering) {
return Nd4j.getComplexStrides(shape, ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
*
* @param buffer
* @param shape
* @param offset
*/
public BaseComplexNDArray(DataBuffer buffer, int[] shape, long offset) {
this(buffer, shape, Nd4j.getComplexStrides(shape), offset, Nd4j.order());
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Creates a complex ndarray with the specified shape
*
* @param shape the shape of the ndarray
* @return the instance
*/
@Override
public IComplexNDArray createComplex(int[] shape) {
return createComplex(shape, Nd4j.getComplexStrides(shape), 0);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Get the strides based on the shape
* and NDArrays.order()
*
* @param shape the shape of the ndarray
* @return the strides for the given shape
* and order specified by NDArrays.order()
*/
public static int[] getComplexStrides(int[] shape) {
return getComplexStrides(shape, Nd4j.order());
}
代码示例来源:origin: deeplearning4j/nd4j
public static long[] getComplexStrides(long[] shape) {
return getComplexStrides(shape, Nd4j.order());
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Create an ndrray with the specified shape
*
* @param data the data to use with tne ndarray
* @param shape the shape of the ndarray
* @return the created ndarray
*/
@Override
public IComplexNDArray createComplex(double[] data, int[] shape) {
//ensure shapes that wind up being scalar end up with the write shape
if (shape.length == 1 && shape[0] == 0) {
shape = new int[] {1, 1};
}
return createComplex(data, shape, Nd4j.getComplexStrides(shape), 0);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Create an ndrray with the specified shape
*
* @param data the data to use with tne ndarray
* @param shape the shape of the ndarray
* @return the created ndarray
*/
@Override
public IComplexNDArray createComplex(float[] data, int[] shape) {
//ensure shapes that wind up being scalar end up with the write shape
if (shape.length == 1 && shape[0] == 0) {
shape = new int[] {1, 1};
}
return createComplex(data, shape, Nd4j.getComplexStrides(shape), 0);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Creates an ndarray with the specified data
*
* @param data the number of columns in the row vector
* @return ndarray
*/
public static IComplexNDArray createComplex(double[] data, char order) {
IComplexNDArray ret = INSTANCE.createComplex(data, Nd4j.getComplexStrides(new int[] {1, data.length}, order), 0,
order);
logCreationIfNecessary(ret);
return ret;
}
代码示例来源:origin: deeplearning4j/nd4j
/**
*
* @param shape
* @param offset
* @param ordering
*/
public BaseComplexNDArray(int[] shape, long offset, char ordering) {
this(Nd4j.createBuffer(ArrayUtil.prodLong(shape) * 2), shape, Nd4j.getComplexStrides(shape, ordering), offset,
ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
*
* @param shape
*/
public BaseComplexNDArray(int[] shape) {
this(Nd4j.createBuffer(ArrayUtil.prodLong(shape) * 2), shape, Nd4j.getComplexStrides(shape));
}
代码示例来源:origin: deeplearning4j/nd4j
public BaseComplexNDArray(int[] shape, char ordering) {
this(Nd4j.createBuffer(ArrayUtil.prodLong(shape) * 2), shape, Nd4j.getComplexStrides(shape, ordering), 0,
ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
public BaseComplexNDArray(long[] shape, char ordering) {
this(Nd4j.createBuffer(ArrayUtil.prodLong(shape) * 2), shape, Nd4j.getComplexStrides(shape, ordering), 0,
ordering);
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Creates an ndarray
*
* @param columns the number of columns in the row vector
* @return ndarray
*/
public static IComplexNDArray createComplex(int columns, char order) {
int[] shape = new int[] {1, columns};
IComplexNDArray ret =
INSTANCE.createComplex(new int[] {1, columns}, Nd4j.getComplexStrides(shape, order), 0, order);
logCreationIfNecessary(ret);
return ret;
}
代码示例来源:origin: deeplearning4j/nd4j
@Override
protected IComplexNDArray create(int[] shape) {
return Nd4j.createComplex(shape, Nd4j.getComplexStrides(shape, ordering()), 0);
}
代码示例来源:origin: deeplearning4j/nd4j
public BaseComplexNDArray(long[] shape) {
this(Nd4j.createBuffer(ArrayUtil.prodLong(shape) * 2), shape, Nd4j.getComplexStrides(shape));
}
代码示例来源:origin: deeplearning4j/nd4j
/**
* Creates a complex ndarray with the specified shape
*
* @param rows the rows of the ndarray
* @param columns the columns of the ndarray
* @return the instance
*/
public static IComplexNDArray createComplex(int rows, int columns, char ordering) {
int[] shape = getEnsuredShape(rows, columns);
checkShapeValues(shape);
IComplexNDArray ret = INSTANCE.createComplex(shape, Nd4j.getComplexStrides(shape, ordering), 0, ordering);
logCreationIfNecessary(ret);
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!