File tree Expand file tree Collapse file tree 4 files changed +13
-218
lines changed
pytorch_forecasting/models Expand file tree Collapse file tree 4 files changed +13
-218
lines changed Original file line number Diff line number Diff line change 1
1
# Release Notes
2
2
3
- ## v0.10.2 Multivariate networks (UNRELEASED )
3
+ ## v0.10.2 Multivariate networks (23/05/2022 )
4
4
5
5
### Added
6
6
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ or to install via conda
47
47
48
48
conda install pytorch-forecasting pytorch>=1.7 -c pytorch -c conda-forge
49
49
50
+ To use the MQF2 loss (multivariate quantile loss), also execute
51
+
52
+ .. code-block ::
53
+
54
+ pip install git+https://github.com/KelvinKan/CP-Flow.git@package-specific-version --no-deps
55
+
50
56
Vist :ref: `Getting started <getting-started >` to learn more about the package and detailled installation instruction.
51
57
The :ref: `Tutorials <tutorials >` section provides guidance on how to use models and implement new ones.
52
58
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -417,23 +417,23 @@ def plot_interpretation(
417
417
plt.Figure: matplotlib figure
418
418
"""
419
419
if not isinstance (self .loss , MultiLoss ): # not multi-target
420
- prediction = self .to_prediction (dict (prediction = output ["prediction" ][[idx ]].detach (). cpu ())) [0 ]
420
+ prediction = self .to_prediction (dict (prediction = output ["prediction" ][[idx ]].detach ())) [0 ]. cpu ()
421
421
block_forecasts = [
422
- self .to_prediction (dict (prediction = block [[idx ]].detach (). cpu ())) [0 ]
422
+ self .to_prediction (dict (prediction = block [[idx ]].detach ())) [0 ]. cpu ()
423
423
for block in output ["block_forecasts" ]
424
424
]
425
425
elif isinstance (output ["prediction" ], (tuple , list )): # multi-target
426
426
figs = []
427
427
# predictions and block forecasts need to be converted
428
- prediction = [p [[idx ]].detach (). cpu () for p in output ["prediction" ]] # select index
428
+ prediction = [p [[idx ]].detach () for p in output ["prediction" ]] # select index
429
429
prediction = self .to_prediction (dict (prediction = prediction )) # transform to prediction
430
- prediction = [p [0 ] for p in prediction ] # select first and only index
430
+ prediction = [p [0 ]. cpu () for p in prediction ] # select first and only index
431
431
432
432
block_forecasts = [
433
- self .to_prediction (dict (prediction = [b [[idx ]].detach (). cpu () for b in block ]))
433
+ self .to_prediction (dict (prediction = [b [[idx ]].detach () for b in block ]))
434
434
for block in output ["block_forecasts" ]
435
435
]
436
- block_forecasts = [[b [0 ] for b in block ] for block in block_forecasts ]
436
+ block_forecasts = [[b [0 ]. cpu () for b in block ] for block in block_forecasts ]
437
437
438
438
for i in range (len (self .target_names )):
439
439
if ax is not None :
You can’t perform that action at this time.
0 commit comments