Beispiel #1
0
        static Concat SetupConcat(ConcatParameter param, string name, string[] inputNames, string[] outputNames)
        {
            int axis = param.Axis;

            if (axis == 1 && param.ConcatDim != 1)
            {
                axis = (int)param.ConcatDim;
            }

            //Caffe及びChainerは暗黙的に1次元目をBacthとして利用しているため補正を行う
            return(new Concat(axis - 1, name, inputNames, outputNames));
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>   Sets up the concatenate. </summary>
        ///
        /// <param name="param">        The parameter. </param>
        /// <param name="name">         The name. </param>
        /// <param name="inputNames">   List of names of the inputs. </param>
        /// <param name="outputNames">  List of names of the outputs. </param>
        ///
        /// <returns>   A Concat. </returns>
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        static Concat SetupConcat(ConcatParameter param, string name, string[] inputNames, string[] outputNames)
        {
            int axis = param.Axis;

            if (axis == 1 && param.ConcatDim != 1)
            {
                axis = (int)param.ConcatDim;
            }

            // Caffe and Chainer implicitly use the first dimension as Bacth, so make correction
            return(new Concat(axis - 1, name, inputNames, outputNames));
        }
Beispiel #3
0
        static Concat <T> SetupConcat <T>(ConcatParameter param, string name, string[] inputNames, string[] outputNames) where T : unmanaged, IComparable <T>
        {
            int axis = param.Axis;

            if (axis == 1 && param.ConcatDim != 1)
            {
                axis = (int)param.ConcatDim;
            }

            //Caffe及びChainerは暗黙的に1次元目をBacthとして利用しているため補正を行う
            return(new Concat <T>(axis - 1, name, inputNames, outputNames));
        }