Open susie-ku opened 1 year ago
Hi! Thank you for sharing your experience! I will keep this issue open and fix it a bit later. I think the best way to fix the issue is to specify here that 2-dimensional data is expected and/or add assert
somewhere. I am afraid that supporting dynamic shapes and performing implicit transformations can be dangerous long-term.
Thank you for the response! Do you mean that for now we should pass only 2d data as input? Btw my solution isn't so good, because later it produces errors with target's shape XD
Do you mean that for now we should pass only 2d data as input?
Yes, all feature arrays (X_*_{train|val|test}.npy
) must have the shape (n_objects, n_features)
, even if any of the two dimensions is equal to 1.
Excellent work Yura!
FYI @susie-ku working with Transformer you usually encounter matrix multiplication. I always keep my eyes on whether a vector with shape (x,)
or (x,y)
. Reshape (x,)
to (1, x)
or (x, 1)
is necessary.
Hi! Thank you for your interesting work. I faced some problems because of this function (https://github.com/yandex-research/tabular-dl-tabr/blob/d628ec7e1c0a66011473021034e7dd4a77740112/lib/data.py#L117). I have dataset with only one binary feature, it is flattened to 1d tensor, but later 2d tensor expected. Writing
torch.atleast_2d(torch.as_tensor(value)).to(device)
instead oftorch.as_tensor(value).to(device)
solved this problem.