Skip to content

Instantly share code, notes, and snippets.

View agibsonccc's full-sized avatar

Adam Gibson agibsonccc

View GitHub Profile
In [43]: a.ctypes.data_as(ctypes.POINTER(ctypes.c_longlong)).contents
Out[43]: c_long(4607182418800017408)
In [44]: nd4j_arr = nd4j.createFromNpyPointer(native_ops.pointerForAddress(4607182418800017408))
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f842d2346fa, pid=2617, tid=0x00007f842e682780
#
# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
[8]: a = np.linspace(1,4,4).reshape(2,2)
In [9]: pointer, read_only_flag = a.__array_interface__['data']
In [10]: type(pointer)
Out[10]: int
In [11]: a_pointer_for_nd4j = native_ops.pointerForAddress(pointer)
In [12]: a_pointer_for_nd4j
This file has been truncated, but you can view the full file.
#include <jni.h>
#include "JCCEnv.h"
#include "org/nd4j/linalg/api/ops/impl/transforms/LogSoftMax.h"
#include "org/nd4j/linalg/api/ops/Op.h"
#include "org/nd4j/linalg/api/ndarray/INDArray.h"
#include "java/lang/String.h"
#include "java/lang/Class.h"
#include "JArray.h"
namespace org {
LF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Warning: renaming static method 'hashCode' on class java.lang.Short to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'toString' on class java.lang.Short to 'toString_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'hashCode' on class java.lang.Character to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'toString' on class java.lang.Character to 'toString_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'hashCode' on class java.lang.Integer to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'toString' on class java.lang.Integer to 'toString_' since it is s
Warning: renaming static method 'hashCode' on class java.lang.Float to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'isInfinite' on class java.lang.Float to 'isInfinite_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'isNaN' on class java.lang.Float to 'isNaN_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'toString' on class java.lang.Float to 'toString_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'hashCode' on class java.lang.Boolean to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'toString' on class java.lang.Boolean to 'toString_' since it is shadowed by non-static method of same name.
Warning: renaming static method 'hashCode' on class java.lang.Short to 'hashCode_' since it is shadowed by non-static method of same name.
Warning: renaming static method '
eption: java.lang.RuntimeException: java.lang.RuntimeException: org.nd4j.shade.jackson.databind.JsonMappingException: Could not resolve type id 'mean' into a subtype of [simple type, class org.deeplearning4j.nn.conf.distribution.Distribution]: known type ids = [Distribution, binomial, gaussian, normal, uniform]
at [Source: {
"backprop" : true,
"backpropType" : "Standard",
"defaultConfiguration" : {
"iterationCount" : 0,
"l1ByParam" : { },
"l2ByParam" : { },
"layer" : null,
"leakyreluAlpha" : 0.0,
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
INPUT_direct all -- anywhere anywhere
INPUT_ZONES_SOURCE all -- anywhere anywhere
INPUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Caused by: java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-videoinput-0.200-1.3_426a2fac0205557c3fa018cef24cfb2de09aef88-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-support-annotations-23.3.0_5e577ff9a0e458554f80c6efb0e8b8f408b5e9ae-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-stax2-api-3.1.4_bd921ada7b36b8a7cd4324bea5741011ce941426-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-snakeyaml-1.12_cd9b235c70884c42ce5c3b0437a60c6a3818d093-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/workarea.aficionado/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/workarea
+------------------------------------------------------+
| NVIDIA-SMI 352.93 Driver Version: 352.93 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX TIT... Off | 0000:04:00.0 Off | N/A |
| 22% 37C P2 69W / 250W | 1544MiB / 12287MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX TIT... Off | 0000:05:00.0 Off | N/A |
val driverProps = propsCon.value
val sourceFile = new File(driverProps.filePath)
logger.info(s"the exported file is ${sourceFile.getPath}")
val numLinesToSkip: Int = 0
val delimiter: String = ", "
val schema: Schema = new Schema.Builder() //.addColumnString("year").addColumnString("month")
.addColumnString("accountNum").addColumnString("name").addColumnString("Date")
.addColumnString("status").addColumnString("accountType").addColumnString("consumerTier")
.addColumnString("oem").addColumnString("phone").addColumnString("postalCode")