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 test_unetr() in model_tests.py #301

Open
hvgazula opened this issue Mar 20, 2024 · 1 comment
Open

Add test_unetr() in model_tests.py #301

hvgazula opened this issue Mar 20, 2024 · 1 comment
Assignees
Labels

Comments

@hvgazula
Copy link
Contributor

hvgazula commented Mar 20, 2024

related to #302

@hvgazula
Copy link
Contributor Author

The test works fine on a GPU but not on the github runner (CPU and 16 GB).

Here's a working test-

    from nobrainer.models import unetr
    import numpy as np

    model = unetr()
    model.summary()

    X_train = np.random.rand(1, 96, 96, 96, 3)
    y_train = np.random.rand(1, 96, 96, 96, 1)

    model.compile(loss="binary_crossentropy", optimizer="adam")
    model.fit(X_train, y_train)
    print(model.predict(X_train).shape)

The original code (on MONAI) is also locked to the specific input size, the number of transformer blocks, and other details. I will leave this issue open. This could be a good hackathon issue.

@hvgazula hvgazula moved this from In Progress to Future in Harsha Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant