model_remediation.min_diff.keras.utils.validate_min_diff_structure
Stay organized with collections
Save and categorize content based on your preferences.
Validates that struct
is a valid MinDiff structure.
model_remediation.min_diff.keras.utils.validate_min_diff_structure(
struct, struct_name='struct', element_type=None
)
Arguments |
struct
|
Structure that will be validated.
|
struct_name
|
Name of struct, used only for error messages.
|
element_type
|
Type of elements. If None , types are not checked.
|
A struct
is a valid MinDiff structure if it is either a single element
(including tuples) or is an unnested dictionary (with string keys). If
element_type
is set, the function will also validate that all elements are
of the correct type.
Raises |
TypeError
|
If struct is neither a single element (including a tuple) nor a
dict.
|
ValueError
|
If struct is a dict with non-string keys.
|
ValueError
|
If struct is a dict with values that are not single elements
(including tuples).
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-28 UTC."],[],[]]