Beispiel #1
0
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->InputTensor  = InputTensor.__MarshalAlloc();
        @ref->RoiTensor    = RoiTensor.__MarshalAlloc();
        @ref->OutputTensor = OutputTensor.__MarshalAlloc();
        @ref->SpatialScale = SpatialScale;
        @ref->PooledSize   = PooledSize;

        return(new(@ref));
    }
Beispiel #2
0
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->InputTensor             = InputTensor.__MarshalAlloc();
        @ref->RoiTensor               = RoiTensor.__MarshalAlloc();
        @ref->BatchIndicesTensor      = BatchIndicesTensor.__MarshalAlloc();
        @ref->OutputTensor            = OutputTensor.__MarshalAlloc();
        @ref->ReductionFunction       = ReductionFunction;
        @ref->InterpolationMode       = InterpolationMode;
        @ref->SpatialScaleX           = SpatialScaleX;
        @ref->SpatialScaleY           = SpatialScaleY;
        @ref->OutOfBoundsInputValue   = OutOfBoundsInputValue;
        @ref->MinimumSamplesPerOutput = MinimumSamplesPerOutput;
        @ref->MaximumSamplesPerOutput = MaximumSamplesPerOutput;

        return(new(@ref));
    }
    unsafe IntPtr IOperatorDescriptionMarshal.__MarshalAlloc()
    {
        __Native * @ref = UnsafeUtilities.Alloc <__Native>();

        @ref->InputTensor             = (InputTensor != null) ? InputTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->InputGradientTensor     = InputGradientTensor.__MarshalAlloc();
        @ref->RoiTensor               = RoiTensor.__MarshalAlloc();
        @ref->BatchIndicesTensor      = BatchIndicesTensor.__MarshalAlloc();
        @ref->OutputGradientTensor    = (OutputGradientTensor != null) ? OutputGradientTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->OutputROIGradientTensor = (OutputROIGradientTensor != null) ? OutputROIGradientTensor.Value.__MarshalAlloc() : IntPtr.Zero;
        @ref->ReductionFunction       = ReductionFunction;
        @ref->InterpolationMode       = InterpolationMode;
        @ref->SpatialScaleX           = SpatialScaleX;
        @ref->SpatialScaleY           = SpatialScaleY;
        @ref->InputPixelOffset        = InputPixelOffset;
        @ref->OutputPixelOffset       = OutputPixelOffset;
        @ref->MinimumSamplesPerOutput = MinimumSamplesPerOutput;
        @ref->MaximumSamplesPerOutput = MaximumSamplesPerOutput;
        @ref->AlignRegionsToCorners   = AlignRegionsToCorners;

        return(new(@ref));
    }