Example #1
0
    public YOLOHandler(NNHandler nn)
    {
        this.nn = nn;
        cpuOps  = BarracudaUtils.CreateOps(WorkerFactory.Type.CSharpRef);

        inputWidthHeight = nn.model.inputs[0].shape[1];
    }
    public YOLOHandler(NNHandler nn)
    {
        this.nn = nn;
        ops     = BarracudaUtils.CreateOps(WorkerFactory.Type.Compute);
        cpuOps  = BarracudaUtils.CreateOps(WorkerFactory.Type.CSharp);

        inputWidthHeight = nn.model.inputs[0].shape[1];
        premulTensor     = new Tensor(1, 1, new float[] { 255 });

        PerformanceCounter.GetInstance()?.AddCounter(stopwatch);
    }