예제 #1
0
        public static long max(this TF_DataType type)
        {
            switch (type)
            {
            case TF_DataType.TF_INT8:
                return(sbyte.MaxValue);

            case TF_DataType.TF_INT16:
                return(short.MaxValue);

            case TF_DataType.TF_INT32:
                return(int.MaxValue);

            case TF_DataType.TF_INT64:
                return(long.MaxValue);

            case TF_DataType.TF_UINT8:
                return(byte.MaxValue);

            case TF_DataType.TF_UINT16:
                return(ushort.MaxValue);

            case TF_DataType.TF_UINT32:
                return(uint.MaxValue);

            default:
                throw new NotImplementedException($"max {type.name()}");
            }
        }
예제 #2
0
 public object get_config()
 {
     return(new
     {
         value,
         dtype = dtype.name()
     });
 }
예제 #3
0
 public object get_config()
 {
     return(new
     {
         mean = mean,
         stddev = stddev,
         seed = seed,
         dtype = dtype.name()
     });
 }
예제 #4
0
        public static int max(this TF_DataType type)
        {
            switch (type)
            {
            case TF_DataType.TF_UINT8:
                return(255);

            default:
                throw new NotImplementedException($"max {type.name()}");
            }
        }