Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
try to make codestyle checker happy v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ifndef012 committed Jul 18, 2020
1 parent 42d5091 commit 2929dfc
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ def forward(self, x: torch.FloatTensor):

class PairwiseProduct(nn.Module):

def __init__(self):
super().__init__()

def forward(self, x: torch.FloatTensor):
"""
:param x: torch.FloatTensor (batch_sie, num_fields, embedding_dim)
"""
batch_size, num_fields, embedding_dim = x.size()
_, num_fields, _ = x.size()

all_pairs_product = x.unsqueeze(dim=1) * x.unsqueeze(dim=2)
idx_row, idx_col = torch.unbind(torch.triu_indices(num_fields,
Expand Down

0 comments on commit 2929dfc

Please sign in to comment.