コード例 #1
0
        internal static ImageVerticalDataSettings DeserializeImageVerticalDataSettings(JsonElement element)
        {
            Optional <ImageVerticalValidationDataSettings> validationData = default;
            string targetColumnName = default;
            Optional <TestDataSettings> testData     = default;
            TrainingDataSettings        trainingData = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("validationData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        validationData = null;
                        continue;
                    }
                    validationData = ImageVerticalValidationDataSettings.DeserializeImageVerticalValidationDataSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("targetColumnName"))
                {
                    targetColumnName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("testData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        testData = null;
                        continue;
                    }
                    testData = TestDataSettings.DeserializeTestDataSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("trainingData"))
                {
                    trainingData = TrainingDataSettings.DeserializeTrainingDataSettings(property.Value);
                    continue;
                }
            }
            return(new ImageVerticalDataSettings(targetColumnName, testData.Value, trainingData, validationData.Value));
        }
コード例 #2
0
 internal ImageVerticalDataSettings(string targetColumnName, TestDataSettings testData, TrainingDataSettings trainingDataSettings, ImageVerticalValidationDataSettings validationData) : base(targetColumnName, testData, trainingDataSettings)
 {
     ValidationData = validationData;
 }