Skip to content

Commit

Permalink
include_zero removed from make_ites)tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
awarebayes committed Oct 28, 2019
1 parent 84c47d9 commit 0a63c76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions recnn/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ def prepare_batch_static_size(batch, item_embeddings_tensor=False, frame_size=10
# id_to_key - dict index -> key


def make_items_tensor(items_embeddings_key_dict, include_zero=True):
if include_zero:
items_embeddings_key_dict[0] = torch.zeros([128, ])
def make_items_tensor(items_embeddings_key_dict):
keys = list(sorted(items_embeddings_key_dict.keys()))
key_to_id = dict(zip(keys, range(len(keys))))
id_to_key = dict(zip(range(len(keys)), keys))
Expand Down

0 comments on commit 0a63c76

Please sign in to comment.