def make_updatable(self, trainables):
        """
        Make the builder's NeuralNetwork spec updatable.

        Parameters
        ----------
        trainables: list of str
            List of layer names to be set trainable.
        """
        if self.spec is None:
            return

        # check if any layer weights/biases is in FP16 format
        if self._check_fp16_weight_param_exists(self.nn_spec.layers):
            raise ValueError("This model has at least one layer with FP16 weights or bias formats. These networks will "
                             "always be optimized to a full FP16 model format which is not supported to be marked "
                             "updatable. Either make sure the model has no FP16 WeightParams or split the "
                             "network to two models with updatable part of the model as a separate model with no FP16 "
                             "WeightParams. Note that updatable pipelines model can only have the last sub model marked "
                             "as updatable.")

        self.spec.isUpdatable = True

        if (
            not self.spec.specificationVersion
            or self.spec.specificationVersion < _MINIMUM_UPDATABLE_SPEC_VERSION
        ):
            self.spec.specificationVersion = _MINIMUM_UPDATABLE_SPEC_VERSION

        self.nn_spec.updateParams.MergeFromString(b"")
        self.set_shuffle()

        for trainable in trainables:
            if trainable not in self.layer_specs:
                raise ValueError("Layer %s does not exist." % trainable)
            spec_layer = self.layer_specs[trainable]
            spec_layer_type = spec_layer.WhichOneof("layer")
            if spec_layer_type not in _SUPPORTED_UPDATABLE_LAYERS:
                raise ValueError(
                    "Layer %s is not supported to be marked as updatable. Only %s layers "
                    "are supported to be marked updatable."
                    % (trainable, _SUPPORTED_UPDATABLE_LAYERS)
                )
            spec_layer.isUpdatable = True
            typed_layer = getattr(spec_layer, spec_layer.WhichOneof("layer"))
            for fd in typed_layer.DESCRIPTOR.fields:
                field = getattr(typed_layer, fd.name)
                if type(field) == _proto.NeuralNetwork_pb2.LSTMWeightParams:
                    wfs = _get_lstm_weight_fields(field)
                    for wf in wfs:
                        wf.isUpdatable = True
                elif type(field) == _proto.NeuralNetwork_pb2.WeightParams:
                    field.isUpdatable = True
                else:
                    pass

        Make the builder's NeuralNetwork spec updatable.

        Parameters
        ----------
        trainables: list of str
            List of layer names to be set trainable.
        
coremltools/models/neural_network/builder.py