Open wenshutang opened 1 year ago
I have the same issue and no response
@gunewar I believe specifying the normalizer when creating the TimeSeriesDataSet
fixed it for me
training = TimeSeriesDataSet(
...
target_normalizer=TorchNormalizer(method='identity', center=True, transformation=None, method_kwargs={}),
add_target_scales=True,
...
)
@gunewar I believe specifying the normalizer when creating the
TimeSeriesDataSet
fixed it for metraining = TimeSeriesDataSet( ... target_normalizer=TorchNormalizer(method='identity', center=True, transformation=None, method_kwargs={}), add_target_scales=True, ... )
This fixed the error for me too..I still don't understand why
@gunewar I believe specifying the normalizer when creating the
TimeSeriesDataSet
fixed it for metraining = TimeSeriesDataSet( ... target_normalizer=TorchNormalizer(method='identity', center=True, transformation=None, method_kwargs={}), add_target_scales=True, ... )
This fixed the error for me too..I still don't understand why
I guess the error happens when we only have one series...
I think I found the root of the issue - there's a bug in the log_abs_det_jacobian
function (which is used by MultivariateDistributionLoss) for the ReLU target normalizer. I changed line 127 (and 108) in the snippet below from return 0.0
to return torch.tensor(0.0).to(x)
so that it returns a tensor instead of a float, and that seemed to solve the problem.
Expected behavior
I'm evaluating with DeepAR following the example using a single series.
Actual behavior
Getting
AttributeError: 'float' object has no attribute 'shape'
as I try to fit a simple time series.Code to reproduce the problem
My timeseries pandas dataframe
Following the example, here is how training step is defined:
I get this error, omitting some of the trace frames: