Creates a new MLP with the same structure.

    Args:
      name: Optional string specifying the name of the new module. The default
        name is constructed by appending "_clone" to the original name.

    Returns:
      A cloned `MLP` module.
495521
def clone(self, name=None):
    

    if name is None:
      name = self.module_name + "_clone"
    return MLP(
        name=name,
        output_sizes=self.output_sizes,
        activation=self.activation,
        activate_final=self.activate_final,
        initializers=self.initializers,
        partitioners=self.partitioners,
        regularizers=self.regularizers,
        use_bias=self.use_bias,
        use_dropout=self.use_dropout)
19691
def create(self, name):
        
        name = to_text(name)
        return self._post(
            'tags/create',
            data={'tag': {'name': name}},
            result_processor=lambda x: x['tag']
        )
116395
def clone(module: torch.nn.Module, num_copies: int) -> torch.nn.ModuleList:
    """"""
    return torch.nn.ModuleList([copy.deepcopy(module) for _ in range(num_copies)])
205862
def create(self, name, **kwargs):
        
        # These arguments are required
        self.required('create', kwargs, ['hostname', 'port',
                      'storage_hostname', 'volume_type_name', 'size'])
        kwargs['name'] = name
        return self.http_post('/nodes', params=kwargs)
1119331
def build_model_name(cls, name='modelName', output_name='output'):
        
        obj = cls(name)
        obj.exporter = 'generate_model_name'
        obj.output_name = output_name
        return obj
295855
def newProp(self, name, value):
        
        ret = libxml2mod.xmlNewProp(self._o, name, value)
        if ret is None:raise treeError('xmlNewProp() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
1224442
def generate_name(self, name=None):
        '''
        '''
        # If no name provided, use robot name
        if name == None:
            name = self.RobotNamer.generate()
        self.name = name.replace('-','_')
945760
def clone(self):
        # TODO: check docstring
        

        new_node = self.__class__(self._name, self._demand)

        return new_node
167756
def create(self, name, index=None):
        
        if index is None:
            index = len(self)
        self._create(name, index)
        return self[name]
707997
def clone(self, **kw):
        
        newpolicy = self.__class__.__new__(self.__class__)
        for attr, value in self.__dict__.items():
            object.__setattr__(newpolicy, attr, value)
        for attr, value in kw.items():
            if not hasattr(self, attr):
                raise TypeError(
                    "{!r} is an invalid keyword argument for {}".format(
                        attr, self.__class__.__name__))
            object.__setattr__(newpolicy, attr, value)
        return newpolicy
763360
def add_name_variant(self, name):
        
        self._ensure_field('name', {})
        self.obj['name'].setdefault('name_variants', []).append(name)
1055679
def create_spawnve(original_name):
    

    def new_spawnve(mode, path, args, env):
        import os
        send_process_created_message()
        return getattr(os, original_name)(mode, path, patch_args(args), env)

    return new_spawnve
1053235
def copy(self, deep=False, name=None):
        
        if deep:
            other = deepcopy(self)
        else:
            other = copy(self)

        if hasattr(self, 'name'):
            other.name = get_default(name, self.name + '_copy')

        return other
111766
def Copy(self, name=None):
        
        new = copy.copy(self)
        new.d = copy.copy(self.d)
        new.name = name if name is not None else self.name
        return new
313255
def newLayer(self, name):
        
        layerName = name
        glyphName = self.name
        layerName = normalizers.normalizeLayerName(layerName)
        for glyph in self.layers:
            if glyph.layer.name == layerName:
                layer = glyph.layer
                layer.removeGlyph(glyphName)
                break
        glyph = self._newLayer(name=layerName)
        layer = self.font.getLayer(layerName)
        # layer._setLayerInGlyph(glyph)
        return glyph
1805
def create_new_file(help_string=NO_HELP, default=NO_DEFAULT, suffixes=None):
        # type: (str, Union[str, NO_DEFAULT_TYPE], Union[List[str], None]) -> str
        
        # noinspection PyTypeChecker
        return ParamFilename(
            help_string=help_string,
            default=default,
            type_name="new_file",
            suffixes=suffixes,
        )
901588
def newNsPropEatName(self, node, name, value):
        
        if node is None: node__o = None
        else: node__o = node._o
        ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
        if ret is None:raise treeError('xmlNewNsPropEatName() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp