Get a protobuf representation of this object.
(self)
| 199 | self.strategy = strategy |
| 200 | |
| 201 | def export_proto(self): |
| 202 | """Get a protobuf representation of this object.""" |
| 203 | |
| 204 | MutationStrategyMsg = AlgoProto.MutationStrategy |
| 205 | msg = MutationStrategyMsg() |
| 206 | if self.strategy == "null_mutation": |
| 207 | NullMutationMsg = MutationStrategyMsg.NullMutation |
| 208 | msg.null_mutation.CopyFrom(NullMutationMsg()) |
| 209 | elif self.strategy == "replace_activation": |
| 210 | ReplaceActivationMsg = MutationStrategyMsg.ReplaceActivation |
| 211 | msg.replace_activation.CopyFrom(ReplaceActivationMsg()) |
| 212 | elif self.strategy == "replace_convolution": |
| 213 | ReplaceConvolutionMsg = MutationStrategyMsg.ReplaceConvolution |
| 214 | msg.replace_convolution.CopyFrom(ReplaceConvolutionMsg()) |
| 215 | elif self.strategy == "hybrid_mutation": |
| 216 | HybridMutationMsg = MutationStrategyMsg.HybridMutation |
| 217 | msg.hybrid_mutation.CopyFrom(HybridMutationMsg()) |
| 218 | else: |
| 219 | raise ValueError("Unknown Strategy") |
| 220 | return msg |
| 221 | |
| 222 | class RandomPairwiseExchange(MetaLearningStrategy): |
| 223 | """The classic LTFB pairwise tourament metalearning strategy. |
no outgoing calls
no test coverage detected