/// <summary> /// Sets properties and attributes of class in accordance with Binary definition. /// </summary> /// <param name="Definition">Binary definition</param> public override Task FromXml(XmlElement Definition) { if (System.Single.TryParse(Definition.InnerText, out System.Single Value)) { this.value = Value; this.script = null; } else { this.value = null; this.script = new Expression(Definition.InnerText); } return(Task.CompletedTask); }
public static System.Single?ToSingleNullable(object x, bool useDefaultForNull = false, System.Single @default = default(System.Single)) { System.Single?result = null; try { var s = x as string; if (!(DBNull.Value.Equals(x) || x == null || (s != null && string.IsNullOrWhiteSpace(s)))) { result = System.Convert.ToSingle(x); } } catch { } if (result == null && useDefaultForNull) { result = @default; } return(result); }
public object Execute(ExecutorContext context) { System.IO.MemoryStream _ImageContentStream = null; try { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Rekognition.Model.DetectTextRequest(); // populate Filters var requestFiltersIsNull = true; request.Filters = new Amazon.Rekognition.Model.DetectTextFilters(); List <Amazon.Rekognition.Model.RegionOfInterest> requestFilters_filters_RegionsOfInterest = null; if (cmdletContext.Filters_RegionsOfInterest != null) { requestFilters_filters_RegionsOfInterest = cmdletContext.Filters_RegionsOfInterest; } if (requestFilters_filters_RegionsOfInterest != null) { request.Filters.RegionsOfInterest = requestFilters_filters_RegionsOfInterest; requestFiltersIsNull = false; } Amazon.Rekognition.Model.DetectionFilter requestFilters_filters_WordFilter = null; // populate WordFilter var requestFilters_filters_WordFilterIsNull = true; requestFilters_filters_WordFilter = new Amazon.Rekognition.Model.DetectionFilter(); System.Single?requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight = null; if (cmdletContext.WordFilter_MinBoundingBoxHeight != null) { requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight = cmdletContext.WordFilter_MinBoundingBoxHeight.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight != null) { requestFilters_filters_WordFilter.MinBoundingBoxHeight = requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight.Value; requestFilters_filters_WordFilterIsNull = false; } System.Single?requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth = null; if (cmdletContext.WordFilter_MinBoundingBoxWidth != null) { requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth = cmdletContext.WordFilter_MinBoundingBoxWidth.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth != null) { requestFilters_filters_WordFilter.MinBoundingBoxWidth = requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth.Value; requestFilters_filters_WordFilterIsNull = false; } System.Single?requestFilters_filters_WordFilter_wordFilter_MinConfidence = null; if (cmdletContext.WordFilter_MinConfidence != null) { requestFilters_filters_WordFilter_wordFilter_MinConfidence = cmdletContext.WordFilter_MinConfidence.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinConfidence != null) { requestFilters_filters_WordFilter.MinConfidence = requestFilters_filters_WordFilter_wordFilter_MinConfidence.Value; requestFilters_filters_WordFilterIsNull = false; } // determine if requestFilters_filters_WordFilter should be set to null if (requestFilters_filters_WordFilterIsNull) { requestFilters_filters_WordFilter = null; } if (requestFilters_filters_WordFilter != null) { request.Filters.WordFilter = requestFilters_filters_WordFilter; requestFiltersIsNull = false; } // determine if request.Filters should be set to null if (requestFiltersIsNull) { request.Filters = null; } // populate Image var requestImageIsNull = true; request.Image = new Amazon.Rekognition.Model.Image(); System.IO.MemoryStream requestImage_imageContent = null; if (cmdletContext.ImageContent != null) { _ImageContentStream = new System.IO.MemoryStream(cmdletContext.ImageContent); requestImage_imageContent = _ImageContentStream; } if (requestImage_imageContent != null) { request.Image.Bytes = requestImage_imageContent; requestImageIsNull = false; } Amazon.Rekognition.Model.S3Object requestImage_image_S3Object = null; // populate S3Object var requestImage_image_S3ObjectIsNull = true; requestImage_image_S3Object = new Amazon.Rekognition.Model.S3Object(); System.String requestImage_image_S3Object_imageBucket = null; if (cmdletContext.ImageBucket != null) { requestImage_image_S3Object_imageBucket = cmdletContext.ImageBucket; } if (requestImage_image_S3Object_imageBucket != null) { requestImage_image_S3Object.Bucket = requestImage_image_S3Object_imageBucket; requestImage_image_S3ObjectIsNull = false; } System.String requestImage_image_S3Object_imageName = null; if (cmdletContext.ImageName != null) { requestImage_image_S3Object_imageName = cmdletContext.ImageName; } if (requestImage_image_S3Object_imageName != null) { requestImage_image_S3Object.Name = requestImage_image_S3Object_imageName; requestImage_image_S3ObjectIsNull = false; } System.String requestImage_image_S3Object_imageVersion = null; if (cmdletContext.ImageVersion != null) { requestImage_image_S3Object_imageVersion = cmdletContext.ImageVersion; } if (requestImage_image_S3Object_imageVersion != null) { requestImage_image_S3Object.Version = requestImage_image_S3Object_imageVersion; requestImage_image_S3ObjectIsNull = false; } // determine if requestImage_image_S3Object should be set to null if (requestImage_image_S3ObjectIsNull) { requestImage_image_S3Object = null; } if (requestImage_image_S3Object != null) { request.Image.S3Object = requestImage_image_S3Object; requestImageIsNull = false; } // determine if request.Image should be set to null if (requestImageIsNull) { request.Image = null; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); } finally { if (_ImageContentStream != null) { _ImageContentStream.Dispose(); } } }
public object Execute(ExecutorContext context) { System.IO.MemoryStream _ImageContentStream = null; try { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Rekognition.Model.DetectProtectiveEquipmentRequest(); // populate Image var requestImageIsNull = true; request.Image = new Amazon.Rekognition.Model.Image(); System.IO.MemoryStream requestImage_imageContent = null; if (cmdletContext.ImageContent != null) { _ImageContentStream = new System.IO.MemoryStream(cmdletContext.ImageContent); requestImage_imageContent = _ImageContentStream; } if (requestImage_imageContent != null) { request.Image.Bytes = requestImage_imageContent; requestImageIsNull = false; } Amazon.Rekognition.Model.S3Object requestImage_image_S3Object = null; // populate S3Object var requestImage_image_S3ObjectIsNull = true; requestImage_image_S3Object = new Amazon.Rekognition.Model.S3Object(); System.String requestImage_image_S3Object_imageBucket = null; if (cmdletContext.ImageBucket != null) { requestImage_image_S3Object_imageBucket = cmdletContext.ImageBucket; } if (requestImage_image_S3Object_imageBucket != null) { requestImage_image_S3Object.Bucket = requestImage_image_S3Object_imageBucket; requestImage_image_S3ObjectIsNull = false; } System.String requestImage_image_S3Object_imageName = null; if (cmdletContext.ImageName != null) { requestImage_image_S3Object_imageName = cmdletContext.ImageName; } if (requestImage_image_S3Object_imageName != null) { requestImage_image_S3Object.Name = requestImage_image_S3Object_imageName; requestImage_image_S3ObjectIsNull = false; } System.String requestImage_image_S3Object_imageVersion = null; if (cmdletContext.ImageVersion != null) { requestImage_image_S3Object_imageVersion = cmdletContext.ImageVersion; } if (requestImage_image_S3Object_imageVersion != null) { requestImage_image_S3Object.Version = requestImage_image_S3Object_imageVersion; requestImage_image_S3ObjectIsNull = false; } // determine if requestImage_image_S3Object should be set to null if (requestImage_image_S3ObjectIsNull) { requestImage_image_S3Object = null; } if (requestImage_image_S3Object != null) { request.Image.S3Object = requestImage_image_S3Object; requestImageIsNull = false; } // determine if request.Image should be set to null if (requestImageIsNull) { request.Image = null; } // populate SummarizationAttributes var requestSummarizationAttributesIsNull = true; request.SummarizationAttributes = new Amazon.Rekognition.Model.ProtectiveEquipmentSummarizationAttributes(); System.Single?requestSummarizationAttributes_summarizationAttributes_MinConfidence = null; if (cmdletContext.SummarizationAttributes_MinConfidence != null) { requestSummarizationAttributes_summarizationAttributes_MinConfidence = cmdletContext.SummarizationAttributes_MinConfidence.Value; } if (requestSummarizationAttributes_summarizationAttributes_MinConfidence != null) { request.SummarizationAttributes.MinConfidence = requestSummarizationAttributes_summarizationAttributes_MinConfidence.Value; requestSummarizationAttributesIsNull = false; } List <System.String> requestSummarizationAttributes_summarizationAttributes_RequiredEquipmentType = null; if (cmdletContext.SummarizationAttributes_RequiredEquipmentType != null) { requestSummarizationAttributes_summarizationAttributes_RequiredEquipmentType = cmdletContext.SummarizationAttributes_RequiredEquipmentType; } if (requestSummarizationAttributes_summarizationAttributes_RequiredEquipmentType != null) { request.SummarizationAttributes.RequiredEquipmentTypes = requestSummarizationAttributes_summarizationAttributes_RequiredEquipmentType; requestSummarizationAttributesIsNull = false; } // determine if request.SummarizationAttributes should be set to null if (requestSummarizationAttributesIsNull) { request.SummarizationAttributes = null; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); } finally { if (_ImageContentStream != null) { _ImageContentStream.Dispose(); } } }
public static TensorFlow.TFOutput FakeQuantWithMinMaxArgs(this TFGraph graph, TensorFlow.TFOutput inputs, System.Single?min = null, System.Single?max = null, long?num_bits = null, System.Boolean?narrow_range = null, string operName = null) { return(graph.FakeQuantWithMinMaxArgs(inputs, min, max, num_bits, narrow_range, operName)); }
public static object ConvertValue(object value, Field.FieldType toFieldType) { object convertedValue = null; try { switch (toFieldType) { case ESRI.ArcGIS.Client.Field.FieldType.Integer: case ESRI.ArcGIS.Client.Field.FieldType.OID: //typeof(System.Int32?); int intValue = Convert.ToInt32(value); convertedValue = new System.Int32?(intValue); break; case ESRI.ArcGIS.Client.Field.FieldType.SmallInteger: //typeof(System.Int16?); short shortValue = Convert.ToInt16(value); convertedValue = new System.Int16?(shortValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Double: //typeof(System.Double?); double doubleValue = Convert.ToDouble(value); convertedValue = new System.Double?(doubleValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Single: //typeof(System.Single?); float floatValue = Convert.ToSingle(value); convertedValue = new System.Single?(floatValue); break; case ESRI.ArcGIS.Client.Field.FieldType.String: case ESRI.ArcGIS.Client.Field.FieldType.GlobalID: case ESRI.ArcGIS.Client.Field.FieldType.GUID: case ESRI.ArcGIS.Client.Field.FieldType.XML: //typeof(System.String); string stringValue = Convert.ToString(value); convertedValue = stringValue; break; case ESRI.ArcGIS.Client.Field.FieldType.Date: //typeof(System.DateTime?); DateTime dateTimeValue = Convert.ToDateTime(value); convertedValue = new System.DateTime?(dateTimeValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Geometry: case ESRI.ArcGIS.Client.Field.FieldType.Blob: case ESRI.ArcGIS.Client.Field.FieldType.Raster: case ESRI.ArcGIS.Client.Field.FieldType.Unknown: //typeof(System.Object); convertedValue = value; break; default: //typeof(System.Object); convertedValue = value; break; } } catch (Exception) { convertedValue = null; } return(convertedValue); }
public static System.Boolean? Empty(System.Single? arg) { throw new NotSupportedException("This function can only be invoked from LINQ to Entities."); }
public static TensorFlow.TFOutput LRN(this TFGraph graph, TensorFlow.TFOutput input, long?depth_radius = null, System.Single?bias = null, System.Single?alpha = null, System.Single?beta = null, string operName = null) { return(graph.LRN(input, depth_radius, bias, alpha, beta, operName)); }
public static TensorFlow.TFOutput RecordInput(this TFGraph graph, string file_pattern, long?file_random_seed = null, System.Single?file_shuffle_shift_ratio = null, long?file_buffer_size = null, long?file_parallelism = null, long?batch_size = null, string compression_type = null, string operName = null) { return(graph.RecordInput(file_pattern, file_random_seed, file_shuffle_shift_ratio, file_buffer_size, file_parallelism, batch_size, compression_type, operName)); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Rekognition.Model.StartTextDetectionRequest(); if (cmdletContext.ClientRequestToken != null) { request.ClientRequestToken = cmdletContext.ClientRequestToken; } // populate Filters var requestFiltersIsNull = true; request.Filters = new Amazon.Rekognition.Model.StartTextDetectionFilters(); List <Amazon.Rekognition.Model.RegionOfInterest> requestFilters_filters_RegionsOfInterest = null; if (cmdletContext.Filters_RegionsOfInterest != null) { requestFilters_filters_RegionsOfInterest = cmdletContext.Filters_RegionsOfInterest; } if (requestFilters_filters_RegionsOfInterest != null) { request.Filters.RegionsOfInterest = requestFilters_filters_RegionsOfInterest; requestFiltersIsNull = false; } Amazon.Rekognition.Model.DetectionFilter requestFilters_filters_WordFilter = null; // populate WordFilter var requestFilters_filters_WordFilterIsNull = true; requestFilters_filters_WordFilter = new Amazon.Rekognition.Model.DetectionFilter(); System.Single?requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight = null; if (cmdletContext.WordFilter_MinBoundingBoxHeight != null) { requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight = cmdletContext.WordFilter_MinBoundingBoxHeight.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight != null) { requestFilters_filters_WordFilter.MinBoundingBoxHeight = requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxHeight.Value; requestFilters_filters_WordFilterIsNull = false; } System.Single?requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth = null; if (cmdletContext.WordFilter_MinBoundingBoxWidth != null) { requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth = cmdletContext.WordFilter_MinBoundingBoxWidth.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth != null) { requestFilters_filters_WordFilter.MinBoundingBoxWidth = requestFilters_filters_WordFilter_wordFilter_MinBoundingBoxWidth.Value; requestFilters_filters_WordFilterIsNull = false; } System.Single?requestFilters_filters_WordFilter_wordFilter_MinConfidence = null; if (cmdletContext.WordFilter_MinConfidence != null) { requestFilters_filters_WordFilter_wordFilter_MinConfidence = cmdletContext.WordFilter_MinConfidence.Value; } if (requestFilters_filters_WordFilter_wordFilter_MinConfidence != null) { requestFilters_filters_WordFilter.MinConfidence = requestFilters_filters_WordFilter_wordFilter_MinConfidence.Value; requestFilters_filters_WordFilterIsNull = false; } // determine if requestFilters_filters_WordFilter should be set to null if (requestFilters_filters_WordFilterIsNull) { requestFilters_filters_WordFilter = null; } if (requestFilters_filters_WordFilter != null) { request.Filters.WordFilter = requestFilters_filters_WordFilter; requestFiltersIsNull = false; } // determine if request.Filters should be set to null if (requestFiltersIsNull) { request.Filters = null; } if (cmdletContext.JobTag != null) { request.JobTag = cmdletContext.JobTag; } // populate NotificationChannel var requestNotificationChannelIsNull = true; request.NotificationChannel = new Amazon.Rekognition.Model.NotificationChannel(); System.String requestNotificationChannel_notificationChannel_RoleArn = null; if (cmdletContext.NotificationChannel_RoleArn != null) { requestNotificationChannel_notificationChannel_RoleArn = cmdletContext.NotificationChannel_RoleArn; } if (requestNotificationChannel_notificationChannel_RoleArn != null) { request.NotificationChannel.RoleArn = requestNotificationChannel_notificationChannel_RoleArn; requestNotificationChannelIsNull = false; } System.String requestNotificationChannel_notificationChannel_SNSTopicArn = null; if (cmdletContext.NotificationChannel_SNSTopicArn != null) { requestNotificationChannel_notificationChannel_SNSTopicArn = cmdletContext.NotificationChannel_SNSTopicArn; } if (requestNotificationChannel_notificationChannel_SNSTopicArn != null) { request.NotificationChannel.SNSTopicArn = requestNotificationChannel_notificationChannel_SNSTopicArn; requestNotificationChannelIsNull = false; } // determine if request.NotificationChannel should be set to null if (requestNotificationChannelIsNull) { request.NotificationChannel = null; } if (cmdletContext.Video != null) { request.Video = cmdletContext.Video; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> Skipgram(this TFGraph graph, string filename, long batch_size, long?window_size = null, long?min_count = null, System.Single?subsample = null, string operName = null) { return(graph.Skipgram(filename, batch_size, window_size, min_count, subsample, operName)); }
public static TensorFlow.TFOutput CropAndResize(this TFGraph graph, TensorFlow.TFOutput image, TensorFlow.TFOutput boxes, TensorFlow.TFOutput box_ind, TensorFlow.TFOutput crop_size, string method = null, System.Single?extrapolation_value = null, string operName = null) { return(graph.CropAndResize(image, boxes, box_ind, crop_size, method, extrapolation_value, operName)); }
public static TensorFlow.TFOutput Mfcc(this TFGraph graph, TensorFlow.TFOutput spectrogram, TensorFlow.TFOutput sample_rate, System.Single?upper_frequency_limit = null, System.Single?lower_frequency_limit = null, long?filterbank_channel_count = null, long?dct_coefficient_count = null, string operName = null) { return(graph.Mfcc(spectrogram, sample_rate, upper_frequency_limit, lower_frequency_limit, filterbank_channel_count, dct_coefficient_count, operName)); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> FusedBatchNormV2(this TFGraph graph, TensorFlow.TFOutput x, TensorFlow.TFOutput scale, TensorFlow.TFOutput offset, TensorFlow.TFOutput mean, TensorFlow.TFOutput variance, System.Single?epsilon = null, string data_format = null, System.Boolean?is_training = null, string operName = null) { return(graph.FusedBatchNormV2(x, scale, offset, mean, variance, epsilon, data_format, is_training, operName)); }
public static TensorFlow.TFOutput NonMaxSuppression(this TFGraph graph, TensorFlow.TFOutput boxes, TensorFlow.TFOutput scores, TensorFlow.TFOutput max_output_size, System.Single?iou_threshold = null, string operName = null) { return(graph.NonMaxSuppression(boxes, scores, max_output_size, iou_threshold, operName)); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Rekognition.Model.StartSegmentDetectionRequest(); if (cmdletContext.ClientRequestToken != null) { request.ClientRequestToken = cmdletContext.ClientRequestToken; } // populate Filters var requestFiltersIsNull = true; request.Filters = new Amazon.Rekognition.Model.StartSegmentDetectionFilters(); Amazon.Rekognition.Model.StartShotDetectionFilter requestFilters_filters_ShotFilter = null; // populate ShotFilter var requestFilters_filters_ShotFilterIsNull = true; requestFilters_filters_ShotFilter = new Amazon.Rekognition.Model.StartShotDetectionFilter(); System.Single?requestFilters_filters_ShotFilter_shotFilter_MinSegmentConfidence = null; if (cmdletContext.ShotFilter_MinSegmentConfidence != null) { requestFilters_filters_ShotFilter_shotFilter_MinSegmentConfidence = cmdletContext.ShotFilter_MinSegmentConfidence.Value; } if (requestFilters_filters_ShotFilter_shotFilter_MinSegmentConfidence != null) { requestFilters_filters_ShotFilter.MinSegmentConfidence = requestFilters_filters_ShotFilter_shotFilter_MinSegmentConfidence.Value; requestFilters_filters_ShotFilterIsNull = false; } // determine if requestFilters_filters_ShotFilter should be set to null if (requestFilters_filters_ShotFilterIsNull) { requestFilters_filters_ShotFilter = null; } if (requestFilters_filters_ShotFilter != null) { request.Filters.ShotFilter = requestFilters_filters_ShotFilter; requestFiltersIsNull = false; } Amazon.Rekognition.Model.StartTechnicalCueDetectionFilter requestFilters_filters_TechnicalCueFilter = null; // populate TechnicalCueFilter var requestFilters_filters_TechnicalCueFilterIsNull = true; requestFilters_filters_TechnicalCueFilter = new Amazon.Rekognition.Model.StartTechnicalCueDetectionFilter(); System.Single?requestFilters_filters_TechnicalCueFilter_technicalCueFilter_MinSegmentConfidence = null; if (cmdletContext.TechnicalCueFilter_MinSegmentConfidence != null) { requestFilters_filters_TechnicalCueFilter_technicalCueFilter_MinSegmentConfidence = cmdletContext.TechnicalCueFilter_MinSegmentConfidence.Value; } if (requestFilters_filters_TechnicalCueFilter_technicalCueFilter_MinSegmentConfidence != null) { requestFilters_filters_TechnicalCueFilter.MinSegmentConfidence = requestFilters_filters_TechnicalCueFilter_technicalCueFilter_MinSegmentConfidence.Value; requestFilters_filters_TechnicalCueFilterIsNull = false; } Amazon.Rekognition.Model.BlackFrame requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame = null; // populate BlackFrame var requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrameIsNull = true; requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame = new Amazon.Rekognition.Model.BlackFrame(); System.Single?requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MaxPixelThreshold = null; if (cmdletContext.BlackFrame_MaxPixelThreshold != null) { requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MaxPixelThreshold = cmdletContext.BlackFrame_MaxPixelThreshold.Value; } if (requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MaxPixelThreshold != null) { requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame.MaxPixelThreshold = requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MaxPixelThreshold.Value; requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrameIsNull = false; } System.Single?requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MinCoveragePercentage = null; if (cmdletContext.BlackFrame_MinCoveragePercentage != null) { requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MinCoveragePercentage = cmdletContext.BlackFrame_MinCoveragePercentage.Value; } if (requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MinCoveragePercentage != null) { requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame.MinCoveragePercentage = requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame_blackFrame_MinCoveragePercentage.Value; requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrameIsNull = false; } // determine if requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame should be set to null if (requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrameIsNull) { requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame = null; } if (requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame != null) { requestFilters_filters_TechnicalCueFilter.BlackFrame = requestFilters_filters_TechnicalCueFilter_filters_TechnicalCueFilter_BlackFrame; requestFilters_filters_TechnicalCueFilterIsNull = false; } // determine if requestFilters_filters_TechnicalCueFilter should be set to null if (requestFilters_filters_TechnicalCueFilterIsNull) { requestFilters_filters_TechnicalCueFilter = null; } if (requestFilters_filters_TechnicalCueFilter != null) { request.Filters.TechnicalCueFilter = requestFilters_filters_TechnicalCueFilter; requestFiltersIsNull = false; } // determine if request.Filters should be set to null if (requestFiltersIsNull) { request.Filters = null; } if (cmdletContext.JobTag != null) { request.JobTag = cmdletContext.JobTag; } // populate NotificationChannel var requestNotificationChannelIsNull = true; request.NotificationChannel = new Amazon.Rekognition.Model.NotificationChannel(); System.String requestNotificationChannel_notificationChannel_RoleArn = null; if (cmdletContext.NotificationChannel_RoleArn != null) { requestNotificationChannel_notificationChannel_RoleArn = cmdletContext.NotificationChannel_RoleArn; } if (requestNotificationChannel_notificationChannel_RoleArn != null) { request.NotificationChannel.RoleArn = requestNotificationChannel_notificationChannel_RoleArn; requestNotificationChannelIsNull = false; } System.String requestNotificationChannel_notificationChannel_SNSTopicArn = null; if (cmdletContext.NotificationChannel_SNSTopicArn != null) { requestNotificationChannel_notificationChannel_SNSTopicArn = cmdletContext.NotificationChannel_SNSTopicArn; } if (requestNotificationChannel_notificationChannel_SNSTopicArn != null) { request.NotificationChannel.SNSTopicArn = requestNotificationChannel_notificationChannel_SNSTopicArn; requestNotificationChannelIsNull = false; } // determine if request.NotificationChannel should be set to null if (requestNotificationChannelIsNull) { request.NotificationChannel = null; } if (cmdletContext.SegmentType != null) { request.SegmentTypes = cmdletContext.SegmentType; } if (cmdletContext.Video != null) { request.Video = cmdletContext.Video; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.LookoutforVision.Model.CreateModelRequest(); if (cmdletContext.ClientToken != null) { request.ClientToken = cmdletContext.ClientToken; } // populate Description var requestDescriptionIsNull = true; request.Description = new Amazon.LookoutforVision.Model.ModelDescription(); System.DateTime?requestDescription_description_CreationTimestamp = null; if (cmdletContext.Description_CreationTimestamp != null) { requestDescription_description_CreationTimestamp = cmdletContext.Description_CreationTimestamp.Value; } if (requestDescription_description_CreationTimestamp != null) { request.Description.CreationTimestamp = requestDescription_description_CreationTimestamp.Value; requestDescriptionIsNull = false; } System.String requestDescription_description_Description = null; if (cmdletContext.Description_Description != null) { requestDescription_description_Description = cmdletContext.Description_Description; } if (requestDescription_description_Description != null) { request.Description.Description = requestDescription_description_Description; requestDescriptionIsNull = false; } System.DateTime?requestDescription_description_EvaluationEndTimestamp = null; if (cmdletContext.Description_EvaluationEndTimestamp != null) { requestDescription_description_EvaluationEndTimestamp = cmdletContext.Description_EvaluationEndTimestamp.Value; } if (requestDescription_description_EvaluationEndTimestamp != null) { request.Description.EvaluationEndTimestamp = requestDescription_description_EvaluationEndTimestamp.Value; requestDescriptionIsNull = false; } System.String requestDescription_description_KmsKeyId = null; if (cmdletContext.Description_KmsKeyId != null) { requestDescription_description_KmsKeyId = cmdletContext.Description_KmsKeyId; } if (requestDescription_description_KmsKeyId != null) { request.Description.KmsKeyId = requestDescription_description_KmsKeyId; requestDescriptionIsNull = false; } System.String requestDescription_description_ModelArn = null; if (cmdletContext.Description_ModelArn != null) { requestDescription_description_ModelArn = cmdletContext.Description_ModelArn; } if (requestDescription_description_ModelArn != null) { request.Description.ModelArn = requestDescription_description_ModelArn; requestDescriptionIsNull = false; } System.String requestDescription_description_ModelVersion = null; if (cmdletContext.Description_ModelVersion != null) { requestDescription_description_ModelVersion = cmdletContext.Description_ModelVersion; } if (requestDescription_description_ModelVersion != null) { request.Description.ModelVersion = requestDescription_description_ModelVersion; requestDescriptionIsNull = false; } Amazon.LookoutforVision.ModelStatus requestDescription_description_Status = null; if (cmdletContext.Description_Status != null) { requestDescription_description_Status = cmdletContext.Description_Status; } if (requestDescription_description_Status != null) { request.Description.Status = requestDescription_description_Status; requestDescriptionIsNull = false; } System.String requestDescription_description_StatusMessage = null; if (cmdletContext.Description_StatusMessage != null) { requestDescription_description_StatusMessage = cmdletContext.Description_StatusMessage; } if (requestDescription_description_StatusMessage != null) { request.Description.StatusMessage = requestDescription_description_StatusMessage; requestDescriptionIsNull = false; } Amazon.LookoutforVision.Model.OutputConfig requestDescription_description_OutputConfig = null; // populate OutputConfig var requestDescription_description_OutputConfigIsNull = true; requestDescription_description_OutputConfig = new Amazon.LookoutforVision.Model.OutputConfig(); Amazon.LookoutforVision.Model.S3Location requestDescription_description_OutputConfig_description_OutputConfig_S3Location = null; // populate S3Location var requestDescription_description_OutputConfig_description_OutputConfig_S3LocationIsNull = true; requestDescription_description_OutputConfig_description_OutputConfig_S3Location = new Amazon.LookoutforVision.Model.S3Location(); System.String requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Bucket = null; if (cmdletContext.S3Location_Bucket != null) { requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Bucket = cmdletContext.S3Location_Bucket; } if (requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Bucket != null) { requestDescription_description_OutputConfig_description_OutputConfig_S3Location.Bucket = requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Bucket; requestDescription_description_OutputConfig_description_OutputConfig_S3LocationIsNull = false; } System.String requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Prefix = null; if (cmdletContext.S3Location_Prefix != null) { requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Prefix = cmdletContext.S3Location_Prefix; } if (requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Prefix != null) { requestDescription_description_OutputConfig_description_OutputConfig_S3Location.Prefix = requestDescription_description_OutputConfig_description_OutputConfig_S3Location_s3Location_Prefix; requestDescription_description_OutputConfig_description_OutputConfig_S3LocationIsNull = false; } // determine if requestDescription_description_OutputConfig_description_OutputConfig_S3Location should be set to null if (requestDescription_description_OutputConfig_description_OutputConfig_S3LocationIsNull) { requestDescription_description_OutputConfig_description_OutputConfig_S3Location = null; } if (requestDescription_description_OutputConfig_description_OutputConfig_S3Location != null) { requestDescription_description_OutputConfig.S3Location = requestDescription_description_OutputConfig_description_OutputConfig_S3Location; requestDescription_description_OutputConfigIsNull = false; } // determine if requestDescription_description_OutputConfig should be set to null if (requestDescription_description_OutputConfigIsNull) { requestDescription_description_OutputConfig = null; } if (requestDescription_description_OutputConfig != null) { request.Description.OutputConfig = requestDescription_description_OutputConfig; requestDescriptionIsNull = false; } Amazon.LookoutforVision.Model.OutputS3Object requestDescription_description_EvaluationManifest = null; // populate EvaluationManifest var requestDescription_description_EvaluationManifestIsNull = true; requestDescription_description_EvaluationManifest = new Amazon.LookoutforVision.Model.OutputS3Object(); System.String requestDescription_description_EvaluationManifest_evaluationManifest_Bucket = null; if (cmdletContext.EvaluationManifest_Bucket != null) { requestDescription_description_EvaluationManifest_evaluationManifest_Bucket = cmdletContext.EvaluationManifest_Bucket; } if (requestDescription_description_EvaluationManifest_evaluationManifest_Bucket != null) { requestDescription_description_EvaluationManifest.Bucket = requestDescription_description_EvaluationManifest_evaluationManifest_Bucket; requestDescription_description_EvaluationManifestIsNull = false; } System.String requestDescription_description_EvaluationManifest_evaluationManifest_Key = null; if (cmdletContext.EvaluationManifest_Key != null) { requestDescription_description_EvaluationManifest_evaluationManifest_Key = cmdletContext.EvaluationManifest_Key; } if (requestDescription_description_EvaluationManifest_evaluationManifest_Key != null) { requestDescription_description_EvaluationManifest.Key = requestDescription_description_EvaluationManifest_evaluationManifest_Key; requestDescription_description_EvaluationManifestIsNull = false; } // determine if requestDescription_description_EvaluationManifest should be set to null if (requestDescription_description_EvaluationManifestIsNull) { requestDescription_description_EvaluationManifest = null; } if (requestDescription_description_EvaluationManifest != null) { request.Description.EvaluationManifest = requestDescription_description_EvaluationManifest; requestDescriptionIsNull = false; } Amazon.LookoutforVision.Model.OutputS3Object requestDescription_description_EvaluationResult = null; // populate EvaluationResult var requestDescription_description_EvaluationResultIsNull = true; requestDescription_description_EvaluationResult = new Amazon.LookoutforVision.Model.OutputS3Object(); System.String requestDescription_description_EvaluationResult_evaluationResult_Bucket = null; if (cmdletContext.EvaluationResult_Bucket != null) { requestDescription_description_EvaluationResult_evaluationResult_Bucket = cmdletContext.EvaluationResult_Bucket; } if (requestDescription_description_EvaluationResult_evaluationResult_Bucket != null) { requestDescription_description_EvaluationResult.Bucket = requestDescription_description_EvaluationResult_evaluationResult_Bucket; requestDescription_description_EvaluationResultIsNull = false; } System.String requestDescription_description_EvaluationResult_evaluationResult_Key = null; if (cmdletContext.EvaluationResult_Key != null) { requestDescription_description_EvaluationResult_evaluationResult_Key = cmdletContext.EvaluationResult_Key; } if (requestDescription_description_EvaluationResult_evaluationResult_Key != null) { requestDescription_description_EvaluationResult.Key = requestDescription_description_EvaluationResult_evaluationResult_Key; requestDescription_description_EvaluationResultIsNull = false; } // determine if requestDescription_description_EvaluationResult should be set to null if (requestDescription_description_EvaluationResultIsNull) { requestDescription_description_EvaluationResult = null; } if (requestDescription_description_EvaluationResult != null) { request.Description.EvaluationResult = requestDescription_description_EvaluationResult; requestDescriptionIsNull = false; } Amazon.LookoutforVision.Model.ModelPerformance requestDescription_description_Performance = null; // populate Performance var requestDescription_description_PerformanceIsNull = true; requestDescription_description_Performance = new Amazon.LookoutforVision.Model.ModelPerformance(); System.Single?requestDescription_description_Performance_performance_F1Score = null; if (cmdletContext.Performance_F1Score != null) { requestDescription_description_Performance_performance_F1Score = cmdletContext.Performance_F1Score.Value; } if (requestDescription_description_Performance_performance_F1Score != null) { requestDescription_description_Performance.F1Score = requestDescription_description_Performance_performance_F1Score.Value; requestDescription_description_PerformanceIsNull = false; } System.Single?requestDescription_description_Performance_performance_Precision = null; if (cmdletContext.Performance_Precision != null) { requestDescription_description_Performance_performance_Precision = cmdletContext.Performance_Precision.Value; } if (requestDescription_description_Performance_performance_Precision != null) { requestDescription_description_Performance.Precision = requestDescription_description_Performance_performance_Precision.Value; requestDescription_description_PerformanceIsNull = false; } System.Single?requestDescription_description_Performance_performance_Recall = null; if (cmdletContext.Performance_Recall != null) { requestDescription_description_Performance_performance_Recall = cmdletContext.Performance_Recall.Value; } if (requestDescription_description_Performance_performance_Recall != null) { requestDescription_description_Performance.Recall = requestDescription_description_Performance_performance_Recall.Value; requestDescription_description_PerformanceIsNull = false; } // determine if requestDescription_description_Performance should be set to null if (requestDescription_description_PerformanceIsNull) { requestDescription_description_Performance = null; } if (requestDescription_description_Performance != null) { request.Description.Performance = requestDescription_description_Performance; requestDescriptionIsNull = false; } // determine if request.Description should be set to null if (requestDescriptionIsNull) { request.Description = null; } if (cmdletContext.KmsKeyId != null) { request.KmsKeyId = cmdletContext.KmsKeyId; } // populate OutputConfig var requestOutputConfigIsNull = true; request.OutputConfig = new Amazon.LookoutforVision.Model.OutputConfig(); Amazon.LookoutforVision.Model.S3Location requestOutputConfig_outputConfig_S3Location = null; // populate S3Location var requestOutputConfig_outputConfig_S3LocationIsNull = true; requestOutputConfig_outputConfig_S3Location = new Amazon.LookoutforVision.Model.S3Location(); System.String requestOutputConfig_outputConfig_S3Location_output_S3Location_Bucket = null; if (cmdletContext.Output_S3Location_Bucket != null) { requestOutputConfig_outputConfig_S3Location_output_S3Location_Bucket = cmdletContext.Output_S3Location_Bucket; } if (requestOutputConfig_outputConfig_S3Location_output_S3Location_Bucket != null) { requestOutputConfig_outputConfig_S3Location.Bucket = requestOutputConfig_outputConfig_S3Location_output_S3Location_Bucket; requestOutputConfig_outputConfig_S3LocationIsNull = false; } System.String requestOutputConfig_outputConfig_S3Location_output_S3Location_Prefix = null; if (cmdletContext.Output_S3Location_Prefix != null) { requestOutputConfig_outputConfig_S3Location_output_S3Location_Prefix = cmdletContext.Output_S3Location_Prefix; } if (requestOutputConfig_outputConfig_S3Location_output_S3Location_Prefix != null) { requestOutputConfig_outputConfig_S3Location.Prefix = requestOutputConfig_outputConfig_S3Location_output_S3Location_Prefix; requestOutputConfig_outputConfig_S3LocationIsNull = false; } // determine if requestOutputConfig_outputConfig_S3Location should be set to null if (requestOutputConfig_outputConfig_S3LocationIsNull) { requestOutputConfig_outputConfig_S3Location = null; } if (requestOutputConfig_outputConfig_S3Location != null) { request.OutputConfig.S3Location = requestOutputConfig_outputConfig_S3Location; requestOutputConfigIsNull = false; } // determine if request.OutputConfig should be set to null if (requestOutputConfigIsNull) { request.OutputConfig = null; } if (cmdletContext.ProjectName != null) { request.ProjectName = cmdletContext.ProjectName; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Rekognition.Model.CreateStreamProcessorRequest(); // populate Input var requestInputIsNull = true; request.Input = new Amazon.Rekognition.Model.StreamProcessorInput(); Amazon.Rekognition.Model.KinesisVideoStream requestInput_input_KinesisVideoStream = null; // populate KinesisVideoStream var requestInput_input_KinesisVideoStreamIsNull = true; requestInput_input_KinesisVideoStream = new Amazon.Rekognition.Model.KinesisVideoStream(); System.String requestInput_input_KinesisVideoStream_kinesisVideoStream_Arn = null; if (cmdletContext.KinesisVideoStream_Arn != null) { requestInput_input_KinesisVideoStream_kinesisVideoStream_Arn = cmdletContext.KinesisVideoStream_Arn; } if (requestInput_input_KinesisVideoStream_kinesisVideoStream_Arn != null) { requestInput_input_KinesisVideoStream.Arn = requestInput_input_KinesisVideoStream_kinesisVideoStream_Arn; requestInput_input_KinesisVideoStreamIsNull = false; } // determine if requestInput_input_KinesisVideoStream should be set to null if (requestInput_input_KinesisVideoStreamIsNull) { requestInput_input_KinesisVideoStream = null; } if (requestInput_input_KinesisVideoStream != null) { request.Input.KinesisVideoStream = requestInput_input_KinesisVideoStream; requestInputIsNull = false; } // determine if request.Input should be set to null if (requestInputIsNull) { request.Input = null; } if (cmdletContext.Name != null) { request.Name = cmdletContext.Name; } // populate Output var requestOutputIsNull = true; request.Output = new Amazon.Rekognition.Model.StreamProcessorOutput(); Amazon.Rekognition.Model.KinesisDataStream requestOutput_output_KinesisDataStream = null; // populate KinesisDataStream var requestOutput_output_KinesisDataStreamIsNull = true; requestOutput_output_KinesisDataStream = new Amazon.Rekognition.Model.KinesisDataStream(); System.String requestOutput_output_KinesisDataStream_kinesisDataStream_Arn = null; if (cmdletContext.KinesisDataStream_Arn != null) { requestOutput_output_KinesisDataStream_kinesisDataStream_Arn = cmdletContext.KinesisDataStream_Arn; } if (requestOutput_output_KinesisDataStream_kinesisDataStream_Arn != null) { requestOutput_output_KinesisDataStream.Arn = requestOutput_output_KinesisDataStream_kinesisDataStream_Arn; requestOutput_output_KinesisDataStreamIsNull = false; } // determine if requestOutput_output_KinesisDataStream should be set to null if (requestOutput_output_KinesisDataStreamIsNull) { requestOutput_output_KinesisDataStream = null; } if (requestOutput_output_KinesisDataStream != null) { request.Output.KinesisDataStream = requestOutput_output_KinesisDataStream; requestOutputIsNull = false; } // determine if request.Output should be set to null if (requestOutputIsNull) { request.Output = null; } if (cmdletContext.RoleArn != null) { request.RoleArn = cmdletContext.RoleArn; } // populate Settings var requestSettingsIsNull = true; request.Settings = new Amazon.Rekognition.Model.StreamProcessorSettings(); Amazon.Rekognition.Model.FaceSearchSettings requestSettings_settings_FaceSearch = null; // populate FaceSearch var requestSettings_settings_FaceSearchIsNull = true; requestSettings_settings_FaceSearch = new Amazon.Rekognition.Model.FaceSearchSettings(); System.String requestSettings_settings_FaceSearch_faceSearch_CollectionId = null; if (cmdletContext.FaceSearch_CollectionId != null) { requestSettings_settings_FaceSearch_faceSearch_CollectionId = cmdletContext.FaceSearch_CollectionId; } if (requestSettings_settings_FaceSearch_faceSearch_CollectionId != null) { requestSettings_settings_FaceSearch.CollectionId = requestSettings_settings_FaceSearch_faceSearch_CollectionId; requestSettings_settings_FaceSearchIsNull = false; } System.Single?requestSettings_settings_FaceSearch_faceSearch_FaceMatchThreshold = null; if (cmdletContext.FaceSearch_FaceMatchThreshold != null) { requestSettings_settings_FaceSearch_faceSearch_FaceMatchThreshold = cmdletContext.FaceSearch_FaceMatchThreshold.Value; } if (requestSettings_settings_FaceSearch_faceSearch_FaceMatchThreshold != null) { requestSettings_settings_FaceSearch.FaceMatchThreshold = requestSettings_settings_FaceSearch_faceSearch_FaceMatchThreshold.Value; requestSettings_settings_FaceSearchIsNull = false; } // determine if requestSettings_settings_FaceSearch should be set to null if (requestSettings_settings_FaceSearchIsNull) { requestSettings_settings_FaceSearch = null; } if (requestSettings_settings_FaceSearch != null) { request.Settings.FaceSearch = requestSettings_settings_FaceSearch; requestSettingsIsNull = false; } // determine if request.Settings should be set to null if (requestSettingsIsNull) { request.Settings = null; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
public static TensorFlow.TFOutput ApproximateEqual(this TFGraph graph, TensorFlow.TFOutput x, TensorFlow.TFOutput y, System.Single?tolerance = null, string operName = null) { return(graph.ApproximateEqual(x, y, tolerance, operName)); }
public static TensorFlow.TFOutput MutableDenseHashTable(this TFGraph graph, TensorFlow.TFOutput empty_key, TensorFlow.TFDataType value_dtype, string container = null, string shared_name = null, System.Boolean?use_node_name_sharing = null, TensorFlow.TFShape value_shape = null, long?initial_num_buckets = null, System.Single?max_load_factor = null, string operName = null) { return(graph.MutableDenseHashTable(empty_key, value_dtype, container, shared_name, use_node_name_sharing, value_shape, initial_num_buckets, max_load_factor, operName)); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> FixedUnigramCandidateSampler(this TFGraph graph, TensorFlow.TFOutput true_classes, long num_true, long num_sampled, System.Boolean unique, long range_max, string vocab_file = null, System.Single?distortion = null, long?num_reserved_ids = null, long?num_shards = null, long?shard = null, System.Single[] unigrams = null, long?seed = null, long?seed2 = null, string operName = null) { return(graph.FixedUnigramCandidateSampler(true_classes, num_true, num_sampled, unique, range_max, vocab_file, distortion, num_reserved_ids, num_shards, shard, unigrams, seed, seed2, operName)); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> QuantizedInstanceNorm(this TFGraph graph, TensorFlow.TFOutput x, TensorFlow.TFOutput x_min, TensorFlow.TFOutput x_max, System.Boolean?output_range_given = null, System.Single?given_y_min = null, System.Single?given_y_max = null, System.Single?variance_epsilon = null, System.Single?min_separation = null, string operName = null) { return(graph.QuantizedInstanceNorm(x, x_min, x_max, output_range_given, given_y_min, given_y_max, variance_epsilon, min_separation, operName)); }
public override void SetProperty(string name, object value) { esColumnMetadata col = this.Meta.Columns.FindByPropertyName(name); if (col != null) { if (value == null || value is System.String) { // Use the strongly typed property switch (name) { case "OrderID": this.str().OrderID = (string)value; break; case "ProductID": this.str().ProductID = (string)value; break; case "UnitPrice": this.str().UnitPrice = (string)value; break; case "Quantity": this.str().Quantity = (string)value; break; case "Discount": this.str().Discount = (string)value; break; } } else { switch (name) { case "OrderID": if (value == null || value is System.Int32) { this.OrderID = (System.Int32?)value; } OnPropertyChanged(OrderDetailsMetadata.PropertyNames.OrderID); break; case "ProductID": if (value == null || value is System.Int32) { this.ProductID = (System.Int32?)value; } OnPropertyChanged(OrderDetailsMetadata.PropertyNames.ProductID); break; case "UnitPrice": if (value == null || value is System.Decimal) { this.UnitPrice = (System.Decimal?)value; } OnPropertyChanged(OrderDetailsMetadata.PropertyNames.UnitPrice); break; case "Quantity": if (value == null || value is System.Int16) { this.Quantity = (System.Int16?)value; } OnPropertyChanged(OrderDetailsMetadata.PropertyNames.Quantity); break; case "Discount": if (value == null || value is System.Single) { this.Discount = (System.Single?)value; } OnPropertyChanged(OrderDetailsMetadata.PropertyNames.Discount); break; default: break; } } } else if (this.ContainsColumn(name)) { this.SetColumn(name, value); } else { throw new Exception("SetProperty Error: '" + name + "' not found"); } }
public static bool TryGetValue(this SqlDataReader reader, string typeName, string name, ref object output) { if (string.IsNullOrEmpty(typeName)) { output = null; return(false); } bool bRet = false; switch (typeName.ToLower()) { case "system.string": string sOutput = default(string); bRet = TryGetValue <System.String>(reader, name, ref sOutput); output = sOutput; break; case "system.boolean": bool boolOutput = default(bool); bRet = TryGetValue <System.Boolean>(reader, name, ref boolOutput); output = boolOutput; break; case "system.boolean?": bool?boolOutputN = default(bool?); bRet = TryGetValue <System.Boolean?>(reader, name, ref boolOutputN); output = boolOutputN; break; case "system.byte": byte byteOutput = default(byte); bRet = TryGetValue <System.Byte>(reader, name, ref byteOutput); output = byteOutput; break; case "system.byte?": byte?byteOutputN = default(byte?); bRet = TryGetValue <System.Byte?>(reader, name, ref byteOutputN); output = byteOutputN; break; case "system.int16": Int16 int16Output = default(Int16); bRet = TryGetValue <System.Int16>(reader, name, ref int16Output); output = int16Output; break; case "system.int16?": Int16?int16OutputN = default(Int16?); bRet = TryGetValue <System.Int16?>(reader, name, ref int16OutputN); output = int16OutputN; break; case "system.int32": Int32 int32Output = default(Int32); bRet = TryGetValue <System.Int32>(reader, name, ref int32Output); output = int32Output; break; case "system.int32?": Int32?int32OutputN = default(Int32?); bRet = TryGetValue <System.Int32?>(reader, name, ref int32OutputN); output = int32OutputN; break; case "system.int64": Int64 int64Output = default(Int64); bRet = TryGetValue <System.Int64>(reader, name, ref int64Output); output = int64Output; break; case "system.int64?": Int64?int64OutputN = default(Int64?); bRet = TryGetValue <System.Int64?>(reader, name, ref int64OutputN); output = int64OutputN; break; case "system.decimal": decimal decOutput = default(decimal); bRet = TryGetValue <System.Decimal>(reader, name, ref decOutput); output = decOutput; break; case "system.decimal?": decimal?decOutputN = default(decimal?); bRet = TryGetValue <System.Decimal?>(reader, name, ref decOutputN); output = decOutputN; break; case "system.single": System.Single singleOutput = default(System.Single); bRet = TryGetValue <System.Single>(reader, name, ref singleOutput); output = singleOutput; break; case "system.single?": System.Single?singleOutputN = default(System.Single?); bRet = TryGetValue <System.Single?>(reader, name, ref singleOutputN); output = singleOutputN; break; case "system.double": System.Double doubleOutput = default(System.Double); bRet = TryGetValue <System.Double>(reader, name, ref doubleOutput); output = doubleOutput; break; case "system.double?": System.Double?doubleOutputN = default(System.Double?); bRet = TryGetValue <System.Double?>(reader, name, ref doubleOutputN); output = doubleOutputN; break; case "system.datetime": DateTime dOutput = default(DateTime); bRet = TryGetValue <System.DateTime>(reader, name, ref dOutput); output = dOutput; break; case "system.datetime?": DateTime?dOutputN = default(DateTime?); bRet = TryGetValue <System.DateTime?>(reader, name, ref dOutputN); output = dOutputN; break; /* * case "location": * Ins.GeoCoding.Location loc = default(Ins.GeoCoding.Location); * bRet = TryGetValue<Ins.GeoCoding.Location>(reader, name, ref loc); * output = loc; * break; */ default: var type = Type.GetType(typeName, false); if (type != null && type.IsEnum) // one last attempt to get the value, in case it's an enum { int32Output = default(Int32); bRet = TryGetValue <System.Int32>(reader, name, ref int32Output); output = int32Output; break; } else { bRet = false; output = null; } break; } return(bRet); }
public static object ConvertValue(object value, Field.FieldType toFieldType) { object convertedValue = null; try { switch (toFieldType) { case ESRI.ArcGIS.Client.Field.FieldType.Integer: case ESRI.ArcGIS.Client.Field.FieldType.OID: //typeof(System.Int32?); int intValue = Convert.ToInt32(value); convertedValue = new System.Int32?(intValue); break; case ESRI.ArcGIS.Client.Field.FieldType.SmallInteger: //typeof(System.Int16?); short shortValue = Convert.ToInt16(value); convertedValue = new System.Int16?(shortValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Double: //typeof(System.Double?); double doubleValue = Convert.ToDouble(value); convertedValue = new System.Double?(doubleValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Single: //typeof(System.Single?); float floatValue = Convert.ToSingle(value); convertedValue = new System.Single?(floatValue); break; case ESRI.ArcGIS.Client.Field.FieldType.String: case ESRI.ArcGIS.Client.Field.FieldType.GlobalID: case ESRI.ArcGIS.Client.Field.FieldType.GUID: case ESRI.ArcGIS.Client.Field.FieldType.XML: //typeof(System.String); string stringValue = Convert.ToString(value); convertedValue = stringValue; break; case ESRI.ArcGIS.Client.Field.FieldType.Date: //typeof(System.DateTime?); DateTime dateTimeValue = Convert.ToDateTime(value); convertedValue = new System.DateTime?(dateTimeValue); break; case ESRI.ArcGIS.Client.Field.FieldType.Geometry: case ESRI.ArcGIS.Client.Field.FieldType.Blob: case ESRI.ArcGIS.Client.Field.FieldType.Raster: case ESRI.ArcGIS.Client.Field.FieldType.Unknown: //typeof(System.Object); convertedValue = value; break; default: //typeof(System.Object); convertedValue = value; break; } } catch (Exception) { convertedValue = null; } return convertedValue; }
public static TensorFlow.TFOutput DecodeAndCropJpeg(this TFGraph graph, TensorFlow.TFOutput contents, TensorFlow.TFOutput crop_window, long?channels = null, long?ratio = null, System.Boolean?fancy_upscaling = null, System.Boolean?try_recover_truncated = null, System.Single?acceptable_fraction = null, string dct_method = null, string operName = null) { return(graph.DecodeAndCropJpeg(contents, crop_window, channels, ratio, fancy_upscaling, try_recover_truncated, acceptable_fraction, dct_method, operName)); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> SampleDistortedBoundingBox(this TFGraph graph, TensorFlow.TFOutput image_size, TensorFlow.TFOutput bounding_boxes, long?seed = null, long?seed2 = null, System.Single?min_object_covered = null, System.Single[] aspect_ratio_range = null, System.Single[] area_range = null, long?max_attempts = null, System.Boolean?use_image_if_no_bounding_boxes = null, string operName = null) { return(graph.SampleDistortedBoundingBox(image_size, bounding_boxes, seed, seed2, min_object_covered, aspect_ratio_range, area_range, max_attempts, use_image_if_no_bounding_boxes, operName)); }
public static ValueTuple <TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput, TensorFlow.TFOutput> FusedBatchNormGrad(this TFGraph graph, TensorFlow.TFOutput y_backprop, TensorFlow.TFOutput x, TensorFlow.TFOutput scale, TensorFlow.TFOutput reserve_space_1, TensorFlow.TFOutput reserve_space_2, System.Single?epsilon = null, string data_format = null, System.Boolean?is_training = null, string operName = null) { return(graph.FusedBatchNormGrad(y_backprop, x, scale, reserve_space_1, reserve_space_2, epsilon, data_format, is_training, operName)); }
public static TensorFlow.TFOutput DebugNumericSummary(this TFGraph graph, TensorFlow.TFOutput input, string device_name = null, string tensor_name = null, string[] debug_urls = null, System.Single?lower_bound = null, System.Single?upper_bound = null, System.Boolean?mute_if_healthy = null, System.Boolean?gated_grpc = null, string operName = null) { return(graph.DebugNumericSummary(input, device_name, tensor_name, debug_urls, lower_bound, upper_bound, mute_if_healthy, gated_grpc, operName)); }