forked from deeplearning4j/deeplearning4j-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nd4jEx12_LargeMatrices.java
38 lines (34 loc) · 1.31 KB
/
Nd4jEx12_LargeMatrices.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* *****************************************************************************
*
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package org.nd4j.examples.advanced.operations;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
/**
* --- Nd4j Example 13: Large Matrix ---
*
* In this example, we'll see operations with a large matrix
*
* @author Adam Gibson
*/
public class Nd4jEx12_LargeMatrices {
public static void main(String[] args) {
INDArray n = Nd4j.linspace(1,10000000,10000000).reshape(1, 10000000);
System.out.println("MMUL" + n.mmul(n.transpose()));
}
}