Skip to content

Instantly share code, notes, and snippets.

@bikashg
Created March 13, 2017 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bikashg/1462c9ad617d04aa30c82cda42172a68 to your computer and use it in GitHub Desktop.
Save bikashg/1462c9ad617d04aa30c82cda42172a68 to your computer and use it in GitHub Desktop.
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
public class Test {
public static void main(String[] args) {
INDArray two_by_one = Nd4j.zeros(2,1);
INDArray one_by_two = Nd4j.ones(1,2);
INDArray result = two_by_one.add(one_by_two);
System.out.println("result = "+result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment