예제 #1
0
        public IList <float> GetParam(ResNodeParamType paramType)
        {
            var paramName = ParamTypeToName(paramType);

            if (paramName == "")
            {
                return(null);
            }
            return(GetParam(paramName));
        }
예제 #2
0
        public void SetParam(ResNodeParamType paramType, float[] data)
        {
            var paramName = ParamTypeToName(paramType);

            if (paramName == "")
            {
                return;
            }
            SetParam(paramName, data);
        }
예제 #3
0
        private string ParamTypeToName(ResNodeParamType type)
        {
            string paramName = "";

            switch (type)
            {
            case ResNodeParamType.Bias_LayerOne:
                paramName = Name + ".Res1" + Layers.BiasSuffix;
                break;

            case ResNodeParamType.Bias_LayerTwo:
                paramName = Name + ".Res2" + Layers.BiasSuffix;
                break;

            case ResNodeParamType.Weight_LayerOne:
                paramName = Name + ".Res1" + Layers.WeightSuffix;
                break;

            case ResNodeParamType.Weight_LayerTwo:
                paramName = Name + ".Res2" + Layers.WeightSuffix;
                break;
            }
            return(paramName);
        }