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

MXNet engine call failed: MXNetError: Check failed: dshp.ndim() == 3U (2 vs. 3) : Input data should be 3D in batch-num_filter-x #466

Open
thesardorbroo opened this issue Jun 27, 2024 · 1 comment

Comments

@thesardorbroo
Copy link

thesardorbroo commented Jun 27, 2024

Hi every one. I am learning DJL(Deep java library) and I have seen Malicious URL Detector post and I'm going to try it locally, but when I run the code I get error.
image

I have tried to remove FEATURE_LENGTH but got another error:
image

I want to solve the problem but I don't know how to do it(
And I have some questions about source code of Malicious URL Detector line 71 and SequentialBlocks.

  1. Why we initialize 3D shape? in csv data only 2 column(first feature and second is label)
  2. Why we need a lot of blocks? What does it mean acctually? source code
@zachgk
Copy link
Contributor

zachgk commented Jun 27, 2024

  1. We use a 3D shape because most operations work no on single CSV data items, but batches of CSV data items. So the reference to NCW for the expected layout is using the common names for the axes: n for batch size, c for channels (bytes per character) and w for width (number of characters).
  2. Each block is a trainable function used in deep learning. They have state in terms of parameters and possibly child blocks, and use them to compute the result given the input.

You can find more basics for getting into deep learning from our Dive into Deep Learning Book

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

No branches or pull requests

2 participants