<pre>
Name of the kernel making the allocation as set in GraphDef,
e.g., "affine2/weights/Assign".
</pre>

<code>optional string kernel_name = 2;</code>
192782
public java.lang.String getKernelName() {
    java.lang.Object ref = kernelName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      kernelName_ = s;
      return s;
    }
  }
1328998
private static String getBoundedSourceName(String token, Type[] bounds, String direction)
      throws NoSourceNameException {
    List<String> boundNames = new ArrayList<String>();
    for (Type boundary : bounds) {
      boundNames.add(getSourceName(boundary));
    }
    return String.format("%s %s %s", token, direction, join(" & ", boundNames));
  }
829566
def core_name(self):
        
        buf_size = self.MAX_BUF_SIZE
        buf = (ctypes.c_char * buf_size)()
        self._dll.JLINKARM_Core2CoreName(self.core_cpu(), buf, buf_size)
        return ctypes.string_at(buf).decode()
45546
public java.lang.String getVariableName() {
    java.lang.Object ref = variableName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      variableName_ = s;
      return s;
    }
  }
852971
def kernel(self, kernel):
        
        result = javabridge.static_call(
            "weka/classifiers/KernelHelper", "setKernel",
            "(Ljava/lang/Object;Lweka/classifiers/functions/supportVector/Kernel;)Z",
            self.jobject, kernel.jobject)
        if not result:
            raise Exception("Failed to set kernel!")
172220
public java.lang.String getAllocatorName() {
    java.lang.Object ref = allocatorName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      allocatorName_ = s;
      return s;
    }
  }
390320
private String createString(String f)
    {
        return
            "function="+function+f+
            "gridDimX="+gridDimX+f+
            "gridDimY="+gridDimY+f+
            "gridDimZ="+gridDimZ+f+
            "blockDimX="+blockDimX+f+
            "blockDimY="+blockDimY+f+
            "blockDimZ="+blockDimZ+f+
            "sharedMemBytes="+sharedMemBytes+f+
            "hStream="+hStream+f+
            "kernelParams="+kernelParams;
    }
271724
@Override
    public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException {
        this.weights = new HashMap<>();

        INDArray dW;
        if (weights.containsKey(conf.getLAYER_PARAM_NAME_DEPTH_WISE_KERNEL())) {
            dW = weights.get(conf.getLAYER_PARAM_NAME_DEPTH_WISE_KERNEL());
            dW = dW.permute(3, 2, 0, 1);
        } else
            throw new InvalidKerasConfigurationException(
                    "Keras SeparableConvolution2D layer does not contain parameter "
                            + conf.getLAYER_PARAM_NAME_DEPTH_WISE_KERNEL());

        this.weights.put(SeparableConvolutionParamInitializer.DEPTH_WISE_WEIGHT_KEY, dW);

        INDArray pW;
        if (weights.containsKey(conf.getLAYER_PARAM_NAME_POINT_WISE_KERNEL())) {
            pW = weights.get(conf.getLAYER_PARAM_NAME_POINT_WISE_KERNEL());
            pW = pW.permute(3, 2, 0, 1);
        }
        else
            throw new InvalidKerasConfigurationException(
                    "Keras SeparableConvolution2D layer does not contain parameter "
                            + conf.getLAYER_PARAM_NAME_POINT_WISE_KERNEL());

        this.weights.put(SeparableConvolutionParamInitializer.POINT_WISE_WEIGHT_KEY, pW);

        if (hasBias) {
            INDArray bias;
            if (kerasMajorVersion == 2 && weights.containsKey("bias"))
                bias = weights.get("bias");
            else if (kerasMajorVersion == 1 && weights.containsKey("b"))
                bias = weights.get("b");
            else
                throw new InvalidKerasConfigurationException(
                        "Keras SeparableConvolution2D layer does not contain bias parameter");
            this.weights.put(SeparableConvolutionParamInitializer.BIAS_KEY, bias);

        }

    }
31361
public static int cudnnGetRNNDataDescriptor(
        cudnnRNNDataDescriptor RNNDataDesc, 
        int[] dataType, 
        int[] layout, 
        int[] maxSeqLength, 
        int[] batchSize, 
        int[] vectorSize, 
        int arrayLengthRequested, 
        int[] seqLengthArray, 
        Pointer paddingFill)
    {
        return checkResult(cudnnGetRNNDataDescriptorNative(RNNDataDesc, dataType, layout, maxSeqLength, batchSize, vectorSize, arrayLengthRequested, seqLengthArray, paddingFill));
    }
382834
public static String stringFor(int n)
    {
        switch (n)
        {
            case CU_GRAPH_NODE_TYPE_KERNEL: return "CU_GRAPH_NODE_TYPE_KERNEL";
            case CU_GRAPH_NODE_TYPE_MEMCPY: return "CU_GRAPH_NODE_TYPE_MEMCPY";
            case CU_GRAPH_NODE_TYPE_MEMSET: return "CU_GRAPH_NODE_TYPE_MEMSET";
            case CU_GRAPH_NODE_TYPE_HOST: return "CU_GRAPH_NODE_TYPE_HOST";
            case CU_GRAPH_NODE_TYPE_GRAPH: return "CU_GRAPH_NODE_TYPE_GRAPH";
            case CU_GRAPH_NODE_TYPE_EMPTY: return "CU_GRAPH_NODE_TYPE_EMPTY";
        }
        return "INVALID CUgraphNodeType: "+n;
    }
877164
public String getAttributeName(int index) {
        final VertexAttribute attribute = getAttribute(index);
        if (attribute == null) {
            return null;
        }
        return attribute.getName();
    }
955846
public double[][] Kernel2D(int size) {
        if (((size % 2) == 0) || (size < 3) || (size > 101)) {
            try {
                throw new Exception("Wrong size");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        int r = size / 2;
        double[][] kernel = new double[size][size];

        // compute kernel
        double sum = 0;
        for (int y = -r, i = 0; i < size; y++, i++) {
            for (int x = -r, j = 0; j < size; x++, j++) {
                kernel[i][j] = Function2D(x, y);
                sum += kernel[i][j];
            }
        }

        for (int i = 0; i < kernel.length; i++) {
            for (int j = 0; j < kernel[0].length; j++) {
                kernel[i][j] /= sum;
            }
        }

        return kernel;
    }
855560
private static int getDeterministicAssignment(double[] distribution) {
    int assignment = -1;
    for (int i = 0; i < distribution.length; i++) {
      if (distribution[i] == 1.0) {
        if (assignment == -1) assignment = i;
        else return -1;
      } else if (distribution[i] != 0.0) return -1;
    }
    return assignment;
  }
1157302
private void process(double[] data, double min, double max, KernelDensityFunction kernel, int window, double epsilon) {
    dens = new double[data.length];
    var = new double[data.length];

    // This is the desired bandwidth of the kernel.
    double halfwidth = ((max - min) / window) * .5;

    for (int current = 0; current < data.length; current++) {
      double value = 0.0;
      for (int i = current; i >= 0; i--) {
        double delta = Math.abs(data[i] - data[current]) / halfwidth;
        final double contrib = kernel.density(delta);
        value += contrib;
        if (contrib < epsilon) {
          break;
        }
      }
      for (int i = current + 1; i < data.length; i++) {
        double delta = Math.abs(data[i] - data[current]) / halfwidth;
        final double contrib = kernel.density(delta);
        value += contrib;
        if (contrib < epsilon) {
          break;
        }
      }
      double realwidth = (Math.min(data[current] + halfwidth, max) - Math.max(min, data[current] - halfwidth));
      double weight = realwidth / (2 * halfwidth);
      dens[current] = value / (data.length * realwidth * .5);
      var[current] = 1 / weight;
    }
  }
659623
public static int nvgraphAnalyzeClustering(
        nvgraphHandle handle, 
        nvgraphGraphDescr graph_descr, 
        long weight_index, 
        int n_clusters, 
        Pointer clustering, 
        int metric, 
        Pointer score)
    {
        return checkResult(nvgraphAnalyzeClusteringNative(handle, graph_descr, weight_index, n_clusters, clustering, metric, score));
    }
1158312
private static void compute(Kernel kernel, int[] in, int[] out, int width, int height, boolean alpha, int edge)
    {
        final float[] matrix = kernel.getMatrix();
        final int cols = kernel.getWidth();
        final int cols2 = cols / 2;

        for (int y = 0; y < height; y++)
        {
            int index = y;
            final int ioffset = y * width;
            for (int x = 0; x < width; x++)
            {
                compute(matrix, in, out, x, index, ioffset, cols2, width, alpha, edge);
                index += height;
            }
        }
    }
29316
public java.lang.String getVmName() {
    java.lang.Object ref = vmName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      vmName_ = s;
      return s;
    }
  }