Muhammad Ikhwan Perwira
Muhammad Ikhwan Perwira

Reputation: 1072

resample_poly of one-hot encoded masking

I have these tensors:

X_test = X_unseen_flutter[0,0,:][None, :] # (Batch Size, Amplitude Length) -> (1, 3208)
y_true = y_unseen_flutter[0,0,:][None, :] # (Batch Size, Mask Length, Num of Classes) -> (1, 3208, 4) (One-Hot Encoded)

I can resample the X_test, but I have no idea for the y_true:

from scipy.signal import resample_poly

X_test_resampled = resample_poly(X_test, up=512, down=3208, axis=1) # (1, 512)
y_true_resampled = # ??? I expect shape (1, 512, 4)

What is the equivalent of resample_poly but for the one-hot encoded label?

I expect there is a function to do that where it accepts tensor, up, down, mask_axis, class_axis

Upvotes: 0

Views: 35

Answers (0)

Related Questions