| 133 | } |
| 134 | |
| 135 | func (l *LTextVectorization) GetKerasLayerConfig() interface{} { |
| 136 | inboundNodes := [][][]interface{}{ |
| 137 | {}, |
| 138 | } |
| 139 | for _, input := range l.inputs { |
| 140 | inboundNodes[0] = append(inboundNodes[0], []interface{}{ |
| 141 | input.GetName(), |
| 142 | 0, |
| 143 | 0, |
| 144 | map[string]bool{}, |
| 145 | }) |
| 146 | } |
| 147 | return jsonConfigLTextVectorization{ |
| 148 | ClassName: "TextVectorization", |
| 149 | Name: l.name, |
| 150 | Config: map[string]interface{}{ |
| 151 | "dtype": l.dtype.String(), |
| 152 | "max_tokens": l.maxTokens, |
| 153 | "name": l.name, |
| 154 | "ngrams": l.ngrams, |
| 155 | "output_mode": l.outputMode, |
| 156 | "output_sequence_length": l.outputSequenceLength, |
| 157 | "pad_to_max_tokens": l.padToMaxTokens, |
| 158 | "split": l.split, |
| 159 | "standardize": l.standardize, |
| 160 | "trainable": l.trainable, |
| 161 | "vocabulary": l.vocabulary, |
| 162 | }, |
| 163 | InboundNodes: inboundNodes, |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | func (l *LTextVectorization) GetCustomLayerDefinition() string { |
| 168 | return `` |