`c2c.io.read_data.load_tensor` loads NoneType
paupaiz opened this issue · 2 comments
It looks like you are loading the tensor properly since it prints the InteractionTensor object. However, you get Nonetype for the tensor.factors
and tensor.rank
, which means you haven't run the decomposition on that object.
It could be because you are saving the tensor before running the decomposition.
Just checked the google collab and yes, the tensor you are saving is the one without running the decomposition (tensor
). The one to save should be the variable tensor2
, which includes the outputs of running the pipeline. This happens because in that case we are passing the copy_tensor=True
parameter, so the pipeline does not modify the original tensor and outputs a new one instead.
I have now modified the collab to save tensor2
instead. That is, modifying this:
c2c.io.export_variable_with_pickle(tensor, output_folder + 'Tensor.pkl')
to
c2c.io.export_variable_with_pickle(tensor2, output_folder + 'Tensor.pkl')