UNPKG

4.13 kBJavaScriptView Raw
1/**
2 * @license
3 * Copyright 2018 Google LLC. All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * =============================================================================
16 */
17export const json = {
18 '$schema': 'http://json-schema.org/draft-07/schema#',
19 'definitions': {
20 'OpMapper': {
21 'type': 'object',
22 'properties': {
23 'tfOpName': { 'type': 'string' },
24 'category': { '$ref': '#/definitions/Category' },
25 'inputs': {
26 'type': 'array',
27 'items': { '$ref': '#/definitions/InputParamMapper' }
28 },
29 'attrs': {
30 'type': 'array',
31 'items': { '$ref': '#/definitions/AttrParamMapper' }
32 },
33 'customExecutor': { '$ref': '#/definitions/OpExecutor' },
34 'outputs': { 'type': 'array' }
35 },
36 'required': ['tfOpName'],
37 'additionalProperties': false
38 },
39 'Category': {
40 'type': 'string',
41 'enum': [
42 'arithmetic', 'basic_math', 'control', 'convolution', 'custom',
43 'dynamic', 'evaluation', 'image', 'creation', 'graph', 'logical',
44 'matrices', 'normalization', 'reduction', 'slice_join', 'spectral',
45 'transformation', 'sparse', 'string'
46 ]
47 },
48 'InputParamMapper': {
49 'type': 'object',
50 'properties': {
51 'name': { 'type': 'string' },
52 'type': { '$ref': '#/definitions/ParamTypes' },
53 'defaultValue': {
54 'anyOf': [
55 { 'type': 'string' }, { 'type': 'array', 'items': { 'type': 'string' } },
56 { 'type': 'number' }, { 'type': 'array', 'items': { 'type': 'number' } },
57 { 'type': 'boolean' }, { 'type': 'array', 'items': { 'type': 'boolean' } }
58 ]
59 },
60 'notSupported': { 'type': 'boolean' },
61 'start': { 'type': 'number' },
62 'end': { 'type': 'number' }
63 },
64 'required': ['name', 'start', 'type'],
65 'additionalProperties': false
66 },
67 'ParamTypes': {
68 'type': 'string',
69 'enum': [
70 'number', 'string', 'number[]', 'bool', 'shape', 'tensor', 'tensors',
71 'dtype', 'string[]', 'func', 'dtype[]', 'bool[]'
72 ]
73 },
74 'AttrParamMapper': {
75 'type': 'object',
76 'properties': {
77 'name': { 'type': 'string' },
78 'type': { '$ref': '#/definitions/ParamTypes' },
79 'defaultValue': {
80 'anyOf': [
81 { 'type': 'string' }, { 'type': 'array', 'items': { 'type': 'string' } },
82 { 'type': 'number' }, { 'type': 'array', 'items': { 'type': 'number' } },
83 { 'type': 'boolean' }, { 'type': 'array', 'items': { 'type': 'boolean' } }
84 ]
85 },
86 'notSupported': { 'type': 'boolean' },
87 'tfName': { 'type': 'string' },
88 'tfDeprecatedName': { 'type': 'string' }
89 },
90 'required': ['name', 'tfName', 'type'],
91 'additionalProperties': false
92 },
93 'OpExecutor': { 'type': 'object', 'additionalProperties': false }
94 },
95 'items': { '$ref': '#/definitions/OpMapper' },
96 'type': 'array'
97};
98//# sourceMappingURL=op_mapper_schema.js.map
\No newline at end of file