Closed HasnainKhanNiazi closed 1 year ago
While reading some previous issues, I came to know about the creation of custom_head
, I will try it and will update here. Thanks
xb, yb = dls.train.one_batch()
learn.model.backbone(xb.to("cpu")).shape
Above line is giving torch.Size([128, 512, 40])
so I created a create_fc_head
with these params;
bs = 128
nf = 512
c_out = 40
seq_len = 40
custom_head = create_fc_head(nf, c_out, seq_len, fc_dropout=0)
I am using TSTPlus
with this custom head but this is giving this error TypeError: forward() takes 2 positional arguments but 4 were given
, I had a look at the documentation where the head is being created like this, custom_head = partial(create_pool_plus_head, concat_pool=True)
this head is working fine but above isn't working.
Any help will be appreciated. Thanks
I am working on a multivariate time series regression problem where I am having 90 features and one output target. I am using
TSMetaDataset
for creating the dataset along withTSUnwindowedDataset
. Now the problem comes when I set they_func
in theTSUnwindowedDataset
. Let's sayy_func
is like this;Now, let's say the window size is
40
then it will take the mean of all the40
target values and will output only one target which can be retrieved bydls.c
. But with this approach, the dynamics of the targets are being lost and despite the fact that the model is training well or not, we will not be having the dynamics which isn't good in my case as dynamics are really important.Now, I tried to use
dls.d
parameter but with the help of that, the model is assuming that each timestamp is having40
targets as it is giving40
outputs which shouldn't be the case.I wanna use the
dls.c
but at the same time, I want to havedls.c
having data of all the40
timestamps. I hope that my explanation makes sense, if not, I can explain it further. :)