Skip to content

Commit

Permalink
It's extremely cool to have Named Tensor!
Browse files Browse the repository at this point in the history
  • Loading branch information
p768lwy3 committed Oct 17, 2019
1 parent 8b4cdbd commit ddc3aa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ scikit-learn==0.21.3
sqlalchemy==1.3.6
tensorboard==1.14.0
texttable==1.6.2
torch==1.2.0
torch==1.3.0+cpu
torchaudio==0.3.0
torchtext==0.4.0
torchvision==0.4.0
torchvision==0.4.1+cpu
tqdm==4.33.0
4 changes: 3 additions & 1 deletion torecsys/inputs/base/single_index_emb.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ def forward(self, inputs: torch.Tensor) -> torch.Tensor:
T, (B, 1, E): Outputs of SingleIndexEmbedding.
"""
# get embedding tensor from embedding module
return self.embedding(inputs)
embedded_tensor = self.embedding(inputs)
embedded_tensor.names = ('B', 'N', 'E')
return embedded_tensor

0 comments on commit ddc3aa6

Please sign in to comment.