Skip to content

Instantly share code, notes, and snippets.

@zhangxiaoli73
zhangxiaoli73 / rleiou
Created October 17, 2019 07:03
for myj
// compute rle iou
def rleIOU(detection: Array[Tensor[Float]], groud: Array[Tensor[Float]],
height: Array[Int], width: Array[Int],
dtNumber: Int, gtNumber: Int,
iscrowd: Array[Boolean]): Array[Float] = {
val gtBbox = Tensor[Float](gtNumber, 4)
val dtBbox = Tensor[Float](dtNumber, 4)
for (i <- 1 to gtNumber) {
val box = gtBbox.select(1, i)
package com.intel.analytics.bigdl.example
import com.intel.analytics.bigdl._
import com.intel.analytics.bigdl.nn.Module
import com.intel.analytics.bigdl.nn.abstractnn.{AbstractModule, Activity}
import com.intel.analytics.bigdl.tensor.Tensor
import com.intel.analytics.bigdl.utils.Engine
import org.apache.hadoop.fs.Path
import org.apache.spark.SparkContext
import org.apache.spark.sql.SparkSession
@zhangxiaoli73
zhangxiaoli73 / Train url detection
Last active July 19, 2017 03:21
Train url detection
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software