Skip to content

get_config function #212

@jyan26

Description

@jyan26

In t3f nn.py, I was wondering if we could add get_config function to KerasDense class so that we could save the trained model? Right now, without get_config, I got this error message when trying to save the model or using callbacks in model.fit: "NotImplementedError: Layers with arguments in __init__ must override get_config." (I'm using TF 2.0.3.) So maybe we could add something like (I'm not sure if the following is right):

def get_config(self):
  config = super(KerasDense,self).get_config()
  config.update({'input_dims': self.input_dims,
                 'output_dims': self.output_dims,
                 'tt_rank': self.tt_rank,
                 'activation': self.activation,
                 'use_bias': self.use_bias,
                 'kernel_initializer':self.kernel_initializer,
                 'bias_initializer': self.bias_initializer})
  return config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions