MCPcopy Create free account
hub / github.com/10Ring/LAA-Net / _encode_block_string

Method _encode_block_string

models/networks/efficientNet.py:331–350  ·  view source on GitHub ↗

Encode a block to a string. Args: block (namedtuple): A BlockArgs type argument. Returns: block_string: A String form of BlockArgs.

(block)

Source from the content-addressed store, hash-verified

329
330 @staticmethod
331 def _encode_block_string(block):
332 """Encode a block to a string.
333 Args:
334 block (namedtuple): A BlockArgs type argument.
335 Returns:
336 block_string: A String form of BlockArgs.
337 """
338 args = [
339 'r%d' % block.num_repeat,
340 'k%d' % block.kernel_size,
341 's%d%d' % (block.strides[0], block.strides[1]),
342 'e%s' % block.expand_ratio,
343 'i%d' % block.input_filters,
344 'o%d' % block.output_filters
345 ]
346 if 0 < block.se_ratio <= 1:
347 args.append('se%s' % block.se_ratio)
348 if block.id_skip is False:
349 args.append('noskip')
350 return '_'.join(args)
351
352 @staticmethod
353 def decode(string_list):

Callers 1

encodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected