public WeightTensor CreateWeightTensor(long[] sizes, int deviceId, bool cleanWeights = false, string name = "", IComputeGraph graphToBind = null, NormType normType = NormType.None)
        {
            WeightTensor r = new WeightTensor(sizes, deviceId, name, NormType: normType, graphToBind: graphToBind);

            if (cleanWeights)
            {
                r.CleanWeight();
            }

            weights.Add(r);

            return(r);
        }
Example #2
0
        public WeightTensor CreateWeightTensor(long[] sizes, int deviceId, bool cleanWeights = false, string name = "")
        {
            WeightTensor r = new WeightTensor(sizes, deviceId, name);

            if (cleanWeights)
            {
                r.CleanWeight();
            }

            weights.Add(r);

            return(r);
        }
        public WeightTensor CreateWeightTensor(int row, int column, int deviceId, bool cleanWeights = false, string name = "", bool isTrainable = false, IComputeGraph graphToBind = null, NormType normType = NormType.None)
        {
            WeightTensor r = new WeightTensor(new long[2] {
                row, column
            }, deviceId, name: name, isTrainable: isTrainable, NormType: normType, graphToBind: graphToBind);

            if (cleanWeights)
            {
                r.CleanWeight();
            }

            weights.Add(r);

            return(r);
        }
Example #4
0
        public WeightTensor CreateWeightTensor(int row, int column, int deviceId, bool cleanWeights = false, string name = "", bool isTrainable = false)
        {
            WeightTensor r = new WeightTensor(new long[2] {
                row, column
            }, deviceId, name: name, isTrainable: isTrainable);

            if (cleanWeights)
            {
                r.CleanWeight();
            }

            weights.Add(r);

            return(r);
        }