Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tabnet #12

Merged
merged 1 commit into from
Mar 4, 2024
Merged

add tabnet #12

merged 1 commit into from
Mar 4, 2024

Conversation

GreatV
Copy link
Contributor

@GreatV GreatV commented Jan 3, 2024

torch._dynamo.exc.UserError: Dynamic control flow is not supported at the moment. Please use functorch.experimental.control_flow.cond to explicitly capture the control flow

from user code:
   File "/home/greatx/repos/tabnet/pytorch_tabnet/tab_network.py", line 615, in forward
    x = self.embedder(x)
  File "/home/greatx/repos/tabnet/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/greatx/repos/tabnet/pytorch_tabnet/tab_network.py", line 886, in forward
    if is_continuous:

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
  • paddle 无法导出
paddle.jit.dy2static.error.Dy2StKeyError: In transformed code:

    File "/home/greatx/repos/tabnet.paddle/pytorch_tabnet/tab_network.py", line 605, in forward
        x = self.embedder(x)
    File "/home/greatx/repos/tabnet.paddle/pytorch_tabnet/tab_network.py", line 859, in forward
        if self.skip_embedding:
    File "/home/greatx/repos/tabnet.paddle/pytorch_tabnet/tab_network.py", line 863, in forward
        for feat_init_idx, is_continuous in enumerate(self.continuous_idx):
    File "/home/greatx/repos/tabnet.paddle/pytorch_tabnet/tab_network.py", line 864, in forward
        if is_continuous:
    File "/home/greatx/repos/tabnet.paddle/pytorch_tabnet/tab_network.py", line 867, in forward
            cols.append(x[:, feat_init_idx].astype(dtype="float32").reshape((-1, 1)))
        else:
            cols.append(
            ~~~~~~~~~~~~ <--- HERE
                self.embeddings[cat_feat_counter](
                    x[:, feat_init_idx].astype(dtype="int64")

    File "/home/greatx/repos/tabnet.paddle/venv/lib/python3.10/site-packages/paddle/nn/layer/container.py", line 438, in __getitem__
        return self._sub_layers[str(idx)]

    KeyError: 'var _generated_var_2 : LOD_TENSOR.shape().dtype(int64).stop_gradient(True)'

Copy link
Contributor

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow

@SigureMo SigureMo merged commit d6d7f9c into PaddleJitLab:develop Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants