Bihaqo / t3f

Tensor Train decomposition on TensorFlow
https://t3f.readthedocs.io/en/latest/index.html
MIT License
218 stars 56 forks source link

loading the model issue for predication #177

Open Silk760 opened 5 years ago

Silk760 commented 5 years ago

I have some issue loading the model , I tried to modify the KerasDanse layer with get config

  def get_config(self):
    config = {
        'input_dims':self.tt_shape[0],
        'output_dims':self.tt_shape[1],
        '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

but still I have issue load the model using Keras method load_model with specifying the custom object as KerasDense

 load_model('model.h5', custom_objects={'KerasDense':KerasDense})

error

__init__() missing 2 required positional arguments: 'input_dims' and 'output_dims'