Skip to content

can pytorch adaptor enable list input ? #92

@rnwang04

Description

@rnwang04

Hi, when I use neural-compressor, I meet a problem.
Here is part of my model forward function:
transfomer_features, user_features, target_movie_rating = self.encode_input(batch)
and the batch is a sequence of length 9.
error is from this line:
https://github.com/rnwang04/neural-compressor/blob/16a4a12045fcb468da4d33769aff2c1a5e2ba6ba/neural_compressor/adaptor/pytorch.py#L108
In my case, I modify it as :

try:
    output = model(*input)
except:
    output = model(input)

then it works.
So is it possible for you to enable the two types of input?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions