| 109 | } |
| 110 | |
| 111 | func (l *LRandomTranslation) GetKerasLayerConfig() interface{} { |
| 112 | inboundNodes := [][][]interface{}{ |
| 113 | {}, |
| 114 | } |
| 115 | for _, input := range l.inputs { |
| 116 | inboundNodes[0] = append(inboundNodes[0], []interface{}{ |
| 117 | input.GetName(), |
| 118 | 0, |
| 119 | 0, |
| 120 | map[string]bool{}, |
| 121 | }) |
| 122 | } |
| 123 | return jsonConfigLRandomTranslation{ |
| 124 | ClassName: "RandomTranslation", |
| 125 | Name: l.name, |
| 126 | Config: map[string]interface{}{ |
| 127 | "dtype": l.dtype.String(), |
| 128 | "fill_mode": l.fillMode, |
| 129 | "fill_value": l.fillValue, |
| 130 | "height_factor": l.heightFactor, |
| 131 | "interpolation": l.interpolation, |
| 132 | "name": l.name, |
| 133 | "seed": l.seed, |
| 134 | "trainable": l.trainable, |
| 135 | "width_factor": l.widthFactor, |
| 136 | }, |
| 137 | InboundNodes: inboundNodes, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func (l *LRandomTranslation) GetCustomLayerDefinition() string { |
| 142 | return `` |