input_ids, valid_length, type_ids = seqs
out = model(input_ids.as_in_context(ctx),
type_ids.as_in_context(ctx),
valid_length.astype("float32").as_in_context(ctx))
if not task.class_labels:
// regression task
for result in out.asnumpy().reshape(-1).tolist():
After Change
for _, seqs in enumerate(loader_test):
input_ids, valid_length, segment_ids = seqs
input_ids = input_ids.as_in_context(ctx)
valid_length = valid_length.as_in_context(ctx).astype("float32")
if use_roberta:
out = model(input_ids, valid_length)
else: