You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And i get error " ValueError: (InvalidArgument) Input(Y) has error dim. Y'dims[0] must be equal to 2, but received Y'dims[0] is 1.
[Hint: Expected y_dims[y_ndim - 2] == K, but received y_dims[y_ndim - 2]:1 != K:2.] (at /paddle/paddle/phi/kernels/impl/matmul_kernel_impl.h:329)
[operator < linear > error]"
How correctly set
data = dde.data.DataSet(
X_train=X_train,
y_train=y_train,
X_test=X_test, # Assuming no separate test set
y_test=y_test,
col_x=(0,1,),
col_y=(2,),
standardize=False,
)
Prepare the feature matrix (X) and target vector (y)
X = df_clean[['r', 'z']].values # (x, y) pairs
y = df_clean['total_acoustic_pressure'].values.reshape(-1, 1) # acoustic pressure
Split the data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1, random_state=42)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello! I tried to get function approximation like in tutorial (https://deepxde.readthedocs.io/en/latest/demos/function/dataset.html) but i have 2 coordinates (x,y) and 1 target.
And i get error " ValueError: (InvalidArgument) Input(Y) has error dim. Y'dims[0] must be equal to 2, but received Y'dims[0] is 1.
[Hint: Expected y_dims[y_ndim - 2] == K, but received y_dims[y_ndim - 2]:1 != K:2.] (at /paddle/paddle/phi/kernels/impl/matmul_kernel_impl.h:329)
[operator < linear > error]"
How correctly set
data = dde.data.DataSet(
X_train=X_train,
y_train=y_train,
X_test=X_test, # Assuming no separate test set
y_test=y_test,
col_x=(0,1,),
col_y=(2,),
standardize=False,
)
Prepare the feature matrix (X) and target vector (y)
X = df_clean[['r', 'z']].values # (x, y) pairs
y = df_clean['total_acoustic_pressure'].values.reshape(-1, 1) # acoustic pressure
Split the data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1, random_state=42)
Beta Was this translation helpful? Give feedback.
All reactions