Skip to content

Predictions in utils.py #41

@4utumny

Description

@4utumny

utils.py:

for u in users:
    seq = np.zeros([args.maxlen], dtype=np.int32)
    predictions = -model.predict(*[np.array(l) for l in [[u], [seq], item_idx]])

I don't know what the purpose of this line of code is?
predictions = predictions[0]

In the case of a user, and seq is defined as a one-dimensional array, the resulting predictions should only have one user. So what is the meaning of predictions [0]?

Looking forward to your reply and answer!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions