コード例 #1
0
    def save_model(self, path):
        """
        Save the model to a single HDF5 file.

        :param path: String. The path to save the model.
        """
        def save_func(file_path):
            self.model.save(file_path)
        save_file(save_func, path)
コード例 #2
0
    def save_model(self, path, overwrite=True):
        """
        Save the model to a single HDF5 file.

        :param path: String. The path to save the model.
        :param overwrite: Boolean. Whether to silently overwrite any existing file at the target
                location
        """
        def save_func(file_path, over_write=True):
            self.model.save(file_path, overwrite=over_write)

        save_file(save_func, path, over_write=overwrite)
コード例 #3
0
    def save_weights(self, filepath, overwrite=True, save_format=None):

        def save_func(file_path):
            self.model.save_weights(file_path, overwrite, save_format)
        save_file(save_func, filepath)