Esempio n. 1
0
        protected override void EncodeParameterCore(ref TagFileController.TagSegment container)
        {
            container.AddValue("OutScale", OutScale);
            container.AddValue("KernelSize", KernelSize);
            container.AddValue("KernelExpand", KernelExpand);
            container.AddValue("OptimizerType", OptimizerType);
            container.AddValue("Rho", Rho);

            var hashtag = container.AddTag("hash");

            hashtag.AddValue("WeightBias", WeightBias.Hash);
            hashtag.AddValue("WeightKernel", WeightKernel.Hash);

            var bopttag = container.AddTag("OptimizerBiasBuffer");

            for (int i = 0; i < OptimizerBiasBuffer.Count; i++)
            {
                bopttag.AddValue(i.ToString(), OptimizerBiasBuffer[i].Hash);
            }
            var kopttag = container.AddTag("OptimizerKernelBuffer");

            for (int i = 0; i < OptimizerKernelBuffer.Count; i++)
            {
                kopttag.AddValue(i.ToString(), OptimizerKernelBuffer[i].Hash);
            }
        }
Esempio n. 2
0
        protected override void EncodeParameterCore(ref TagFileController.TagSegment container)
        {
            container.AddValue("OptimizerType", OptimizerType);
            container.AddValue("Rho", Rho);

            var hashtag = container.AddTag("hash");

            hashtag.AddValue("Weight", Weight.Hash);

            var opttag = container.AddTag("OptimizerWeightBuffer");

            for (int i = 0; i < OptimizerWeightBuffer.Count; i++)
            {
                opttag.AddValue(i.ToString(), OptimizerWeightBuffer[i].Hash);
            }
        }