This file contains 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
// Same as https://gist.github.com/nebulorum/f7978aa5519cab8bece65d4dac689d4f but using LongPointer | |
import static java.util.concurrent.Executors.newFixedThreadPool; | |
import com.google.common.util.concurrent.ThreadFactoryBuilder; | |
import java.util.concurrent.ScheduledThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicLong; | |
import org.bytedeco.javacpp.LongPointer; |
This file contains 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
import org.bytedeco.javacpp.*; | |
import org.bytedeco.javacpp.annotation.*; | |
/** | |
* java -jar /path/to/javacpp.jar NanoChrono.java | |
* java -cp /path/to/javacpp.jar:. NanoChrono | |
*/ | |
@Platform(include = "chrono") | |
public class NanoChrono { | |
static { Loader.load(); } |
This file contains 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
/* | |
* Copyright (c) 2014, Oracle America, Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* |
This file contains 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
package org.deeplearning4j.examples.convolution.objectdetection; | |
import java.io.File; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import org.bytedeco.javacv.CanvasFrame; | |
import org.bytedeco.javacv.OpenCVFrameConverter; |
This file contains 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
/arm_controller/follow_joint_trajectory/cancel | |
/arm_controller/follow_joint_trajectory/feedback | |
/arm_controller/follow_joint_trajectory/goal | |
/arm_controller/follow_joint_trajectory/result | |
/arm_controller/follow_joint_trajectory/status | |
/arm_with_torso_controller/follow_joint_trajectory/cancel | |
/arm_with_torso_controller/follow_joint_trajectory/feedback | |
/arm_with_torso_controller/follow_joint_trajectory/goal | |
/arm_with_torso_controller/follow_joint_trajectory/result | |
/arm_with_torso_controller/follow_joint_trajectory/status |
This file contains 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
import java.io.File; | |
import java.util.Arrays; | |
import javax.swing.JFrame; | |
import org.math.plot.FrameView; | |
import org.math.plot.Plot2DPanel; | |
import org.math.plot.PlotPanel; | |
import org.math.plot.plots.ColoredScatterPlot; | |
import org.math.plot.plots.ScatterPlot; |
This file contains 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
import java.util.concurrent.*; | |
import org.bytedeco.javacpp.*; | |
import org.bytedeco.javacpp.annotation.*; | |
@Platform(include="testgc.h") | |
public class TestGC { | |
static { Loader.load(); } | |
static native void processLongPtr(@Cast("float*") long ptr, long size); | |
static native void processPointer(FloatPointer ptr, long size); |
This file contains 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
# The train/test net protocol buffer definition | |
net: "examples/mnist/simple_train_test.prototxt" | |
# test_iter specifies how many forward passes the test should carry out. | |
# In the case of MNIST, we have test batch size 100 and 100 test iterations, | |
# covering the full 10,000 testing images. | |
test_iter: 78 | |
# Carry out testing every 500 training iterations. | |
test_interval: 7035 | |
# The base learning rate, momentum and the weight decay of the network. | |
base_lr: 0.006 |
This file contains 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
// Build and execute normally: | |
// $ javac -cp javacpp.jar HelloPointer.java | |
// $ java -jar javacpp.jar HelloPointer | |
// $ java -cp javacpp.jar HelloPointer | |
import org.bytedeco.javacpp.*; | |
import org.bytedeco.javacpp.annotation.*; | |
@Platform | |
public class HelloPointer { |