MCPcopy Create free account
hub / github.com/LBANN/lbann / export_proto

Method export_proto

python/lbann/core/training_algorithm.py:201–220  ·  view source on GitHub ↗

Get a protobuf representation of this object.

(self)

Source from the content-addressed store, hash-verified

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
222class RandomPairwiseExchange(MetaLearningStrategy):
223 """The classic LTFB pairwise tourament metalearning strategy.

Callers 5

do_export_protoMethod · 0.45
do_export_protoMethod · 0.45
export_protoMethod · 0.45
export_protoMethod · 0.45
do_export_protoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected