Beispiel #1
0
        protected override void ProcessRecord()
        {
            IList <Value> results;

            if (ParameterSetName == "Hashtable")
            {
                results = FunctionInvoke.Invoke(Function, Arguments, Device, false);
            }
            else if (ParameterSetName == "DataSourceSet")
            {
                results = FunctionInvoke.Invoke(Function, DataSourceSet, Device, false);
            }
            else
            {
                DataNameToInputMap map   = new DataNameToInputMap(new Function[] { Function }, DataNameToInputMap);
                Minibatch          batch = null;
                var values = new List <Value>();
                do
                {
                    batch = Sampler.GetNextMinibatch(Device);
                    map.InitializeByMinibatch(batch);
                    values.AddRange(FunctionInvoke.Invoke(Function, batch, map, Device));
                }while (!batch.SweepEnd);
                results = values;
            }

            foreach (var r in results)
            {
                WriteObject(r);
            }
        }