예제 #1
0
        public static void Move(UniquePtr <T> source, out UniquePtr <T> target)
        {
            target = new UniquePtr <T>(source.Ptr);

            source._Owner = false;
            target._Owner = true;
        }
예제 #2
0
        public Optimizer SetLearningRateScheduler(UniquePtr <LRScheduler> lrScheduler)
        {
            Logging.CHECK(lrScheduler);
            UniquePtr <LRScheduler> .Move(lrScheduler, out this._LearningRateScheduler);

            this.LearningRateScheduler.Ptr.SetLearningRate(float.Parse(this.Params["lr"]));
            return(this);
        }