Skip to content

About an errror during training process #20

@Hongzunhei

Description

@Hongzunhei

Hi, I encountered the following error while trying to port the nashmtl method into my own multi-task project. Could you please help me understand how to resolve it?
Traceback (most recent call last):
File "/home/data1/train_3_tasks_loss3.py", line 1376, in
main()
File "/home/data1/train_3_tasks_loss3.py", line 628, in main
train_metrics = train_one_epoch(
File "/home/data1/train_3_tasks_loss3.py", line 912, in train_one_epoch
) = _forward()
File "/home/data1/train_3_tasks_loss3.py", line 833, in _forward
loss, extra_outputs = weight_method.backward(
File "/home/data1/lib/methods/weight_methods.py", line 1326, in backward
return self.method.backward(losses, **kwargs)
File "/home/data1/lib/methods/weight_methods.py", line 68, in backward
loss, extra_outputs = self.get_weighted_loss(
File "/home/data1/lib/methods/weight_methods.py", line 286, in get_weighted_loss
alpha = self.solve_optimization(GTG.cpu().detach().numpy())
File "/home/data1/lib/methods/weight_methods.py", line 190, in solve_optimization
self.alpha_param.value = alpha_t
File "/home/anaconda/envs/voxelmorph/lib/python3.8/site-packages/cvxpy/expressions/leaf.py", line 436, in value
self.save_value(self._validate_value(val))
File "/home/anaconda/envs/voxelmorph/lib/python3.8/site-packages/cvxpy/expressions/leaf.py", line 510, in _validate_value
raise ValueError(
ValueError: Variable value must be nonnegative.

It seems there is an issue with setting a nonnegative value for a variable. Any suggestions on how to fix this?

Thank you!

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