Continuous-Time Models Loss Calculation
- Dominant language
- Python
- Stars
- 995
- Forks
- 203
- PR merge metrics
- No merged PRs in 30d
Description
Hi, Havard.
I'm using the CoxPH Model in my project, and trying to apply the corresponding Continuous-Time Loss function, CoxPHLoss, to calculate the loss. However, it got some errors. The output of my net (log_h) was (270, 10), the durations and events were both (270,). When the loss function called, the log_h would be changed into (2700,), and error occurred as follow:
RuntimeError: The size of tensor a (2700) must match the size of tensor b (270) at non-singleton dimension 0
Do you have any suggestions to help me fix this problem? Looking forward to your reply. Thanks for your time and your help.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the CoxPH model and CoxPHLoss entry points, using the reported log_h shape of (270, 10) and durations and events shapes of (270,). Reproduce the tensor-size error and determine the expected input shapes; done means the continuous-time loss handles valid CoxPH outputs without the 2700-versus-270 mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100