public static void Move(UniquePtr <T> source, out UniquePtr <T> target) { target = new UniquePtr <T>(source.Ptr); source._Owner = false; target._Owner = true; }
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); }