示例#1
0
        public void Infer(layers.Quantize layer, QuantizeLayerArgument argument, InferenceContext context)
        {
            var inputAlloc  = context.MainMemoryMap[layer.Input.Connection.From];
            var outputAlloc = context.MainMemoryMap[layer.Output];

            argument.MainMemoryInputAddress  = inputAlloc.GetAddress();
            argument.MainMemoryOutputAddress = outputAlloc.GetAddress();
        }
示例#2
0
 public QuantizeLayerArgument Convert(layers.Quantize layer, ConvertContext context)
 {
     return(new QuantizeLayerArgument
     {
         Count = (uint)layer.Input.Dimensions.GetSize(),
         QuantParam = context.Quantization.Distributions[layer.Output].Global.GetQuantizationParam(8)
     });
 }