# AI For Medicine

**URL:** https://community.deeplearning.ai/c/course-q-a/ai-for-medicine/43.md

[Latest](https://community.deeplearning.ai/latest.md) · [Categories](https://community.deeplearning.ai/categories.md) · [Tags](https://community.deeplearning.ai/tags.md)

---

## [About the AI For Medicine category](https://community.deeplearning.ai/t/about-the-ai-for-medicine-category/3792)

<div class="topic-metadata">

**Author:** [@Community-Team](https://community.deeplearning.ai/u/Community-Team)\
**Replies:** 0\
**Last updated:** [May 7, 2021, 7:39am UTC](https://community.deeplearning.ai/t/about-the-ai-for-medicine-category/3792 "2021-05-07T07:39:20Z")

</div>

To ensure a smooth and productive experience for everyone, here are a few important guidelines regarding posting in our forum: Category Permissions: Please note that learners are not allowed to post in all categorie…

---

## [Applying AI for Medical Diagnosis to an offline chest X-ray screening prototype — advice welcome](https://community.deeplearning.ai/t/applying-ai-for-medical-diagnosis-to-an-offline-chest-x-ray-screening-prototype-advice-welcome/896223)

<div class="topic-metadata">

**Author:** [@Guvanch\_Shahanov](https://community.deeplearning.ai/u/Guvanch_Shahanov)\
**Replies:** 9\
**Last updated:** [November 12, 2026, 9:33pm UTC](https://community.deeplearning.ai/t/applying-ai-for-medical-diagnosis-to-an-offline-chest-x-ray-screening-prototype-advice-welcome/896223 "2026-11-12T21:33:56Z")

</div>

Hi everyone, I’m a lecturer at the Institute of Telecommunications and Informatics of Turkmenistan, currently taking AI for Medical Diagnosis and AI for Medical Prognosis. I’m building ŞYPA, an offline chest X-ray decis…

---

## [C3W3 - Assignment - Exercise 1 - grad\_cam: TypeError: Using a \`tf.Tensor\` as a Python \`bool\` is not allowed](https://community.deeplearning.ai/t/c3w3-assignment-exercise-1-grad-cam-typeerror-using-a-tf-tensor-as-a-python-bool-is-not-allowed/895669)

<div class="topic-metadata">

**Author:** [@ThanhLoanNguyen95](https://community.deeplearning.ai/u/ThanhLoanNguyen95)\
**Replies:** 4\
**Last updated:** [October 13, 2026, 9:56pm UTC](https://community.deeplearning.ai/t/c3w3-assignment-exercise-1-grad-cam-typeerror-using-a-tf-tensor-as-a-python-bool-is-not-allowed/895669 "2026-10-13T21:56:30Z")

</div>

Hi, I am doing Course 3, Week 3, Exercise 1: grad\_cam of AI for medicine. I got the Type Error of the image. I appreciated that anyone could tell me what was wrong in my script. screenshot removed as it contains code…

---

## [\#UNQ\_C1: Type error on grad\_cam function (cam)](https://community.deeplearning.ai/t/unq-c1-type-error-on-grad-cam-function-cam/265422)

<div class="topic-metadata">

**Author:** [@getjaidev](https://community.deeplearning.ai/u/getjaidev)\
**Replies:** 7\
**Last updated:** [October 13, 2026, 5:36pm UTC](https://community.deeplearning.ai/t/unq-c1-type-error-on-grad-cam-function-cam/265422 "2026-10-13T17:36:35Z")

</div>

Lab ID: kuoautcopnzt UNQ\_C1 (UNIQUE CELL IDENTIFIER, DO NOT EDIT) def grad\_cam(input\_model, image, category\_index, layer\_name): The function works correctly. The type of cam is also correct (see output below): type(ca…

---

## [Writing custom data generator](https://community.deeplearning.ai/t/writing-custom-data-generator/201471)

<div class="topic-metadata">

**Author:** [@Jairaj\_Mathur](https://community.deeplearning.ai/u/Jairaj_Mathur)\
**Replies:** 5\
**Last updated:** [September 9, 2026, 2:38pm UTC](https://community.deeplearning.ai/t/writing-custom-data-generator/201471 "2026-09-09T14:38:53Z")

</div>

Hi all I am trying to work on the whole dataset available for brain tumour, available at the website mentioned in the assignment (Task01\_BrainTumour) I would have do the step of creating subvolumes within the data gene…

---

## [Effort estimation to build CNN classifier for chest X‑rays](https://community.deeplearning.ai/t/effort-estimation-to-build-cnn-classifier-for-chest-x-rays/894753)

<div class="topic-metadata">

**Author:** [@Adnan\_Memic1](https://community.deeplearning.ai/u/Adnan_Memic1)\
**Replies:** 1\
**Last updated:** [August 22, 2026, 11:15am UTC](https://community.deeplearning.ai/t/effort-estimation-to-build-cnn-classifier-for-chest-x-rays/894753 "2026-08-22T11:15:11Z")

</div>

I have showcased the CNN classifier for chest X-ray to a big public hospital in south east Europe. They are interested and want to get started. They want to but and keep the model in-house. I am struggling in defining mi…

---

## [P value in statistics](https://community.deeplearning.ai/t/p-value-in-statistics/894404)

<div class="topic-metadata">

**Author:** [@Sukhjot\_Kaur1](https://community.deeplearning.ai/u/Sukhjot_Kaur1)\
**Replies:** 7\
**Last updated:** [August 13, 2026, 4:09am UTC](https://community.deeplearning.ai/t/p-value-in-statistics/894404 "2026-08-13T04:09:17Z")

</div>

HI I was looking at the video about randomized controlled trials in week 1, I have a doubt, I would really appreciate if someone can help me with it. The doubt is as follows: what is p value and why is it that the lowe…

---

## [AI for Medical Treatment / Week 2: Graded Quiz question on Cox Proportional Hazards model](https://community.deeplearning.ai/t/ai-for-medical-treatment-week-2-graded-quiz-question-on-cox-proportional-hazards-model/893277)

<div class="topic-metadata">

**Author:** [@Mohammed\_Eltayeb1](https://community.deeplearning.ai/u/Mohammed_Eltayeb1)\
**Replies:** 1\
**Last updated:** [July 5, 2026, 1:08pm UTC](https://community.deeplearning.ai/t/ai-for-medical-treatment-week-2-graded-quiz-question-on-cox-proportional-hazards-model/893277 "2026-07-05T13:08:47Z")

</div>

Before you post, please make sure to: Add a clear title that describes your question. Add all required tags in the tag option (top-right of the post): The platform (e.g., dl-ai-learning-platform or Coursera-plat…

---

## [Discussion on Medical Image ion & Evaluation Metrics](https://community.deeplearning.ai/t/discussion-on-medical-image-ion-evaluation-metrics/893251)

<div class="topic-metadata">

**Author:** [@Mohammed\_Eltayeb1](https://community.deeplearning.ai/u/Mohammed_Eltayeb1)\
**Replies:** 3\
**Last updated:** [July 5, 2026, 9:28am UTC](https://community.deeplearning.ai/t/discussion-on-medical-image-ion-evaluation-metrics/893251 "2026-07-05T09:28:20Z")

</div>

Before you post, please make sure to: Add a clear title that describes your question. Add all required tags in the tag option (top-right of the post): The platform (e.g., dl-ai-learning-platform or Coursera-plat…

---

## [Soft\_Dice\_Loss and Tensorflow v1 /v2 MRI segmentation](https://community.deeplearning.ai/t/soft-dice-loss-and-tensorflow-v1-v2-mri-segmentation/890289)

<div class="topic-metadata">

**Author:** [@user440](https://community.deeplearning.ai/u/user440)\
**Replies:** 4\
**Last updated:** [July 5, 2026, 5:19am UTC](https://community.deeplearning.ai/t/soft-dice-loss-and-tensorflow-v1-v2-mri-segmentation/890289 "2026-07-05T05:19:08Z")

</div>

Hi, I’m trying to implement the multi-class version of soft\_dice\_loss but facing the difficulty that test cases include both single-class and multi-class inputs, for example : print(“Case 4:\\n”) print(“Pred:\\n”) pr…

---

## [Discussion on Medical yes Evaluation Metrics](https://community.deeplearning.ai/t/discussion-on-medical-yes-evaluation-metrics/893276)

<div class="topic-metadata">

**Author:** [@Mohammed\_Eltayeb1](https://community.deeplearning.ai/u/Mohammed_Eltayeb1)\
**Replies:** 0\
**Last updated:** [July 5, 2026, 3:56am UTC](https://community.deeplearning.ai/t/discussion-on-medical-yes-evaluation-metrics/893276 "2026-07-05T03:56:48Z")

</div>

Hi everyone, ​I’ve been thinking about the trade-offs when processing volumetric medical data like MRI sequences. ​When we use a 2D segmentation model and slice each MRI independently, we inevitably lose critical spati…

---

## [C3\_W1: assignment UNQ\_C2](https://community.deeplearning.ai/t/c3-w1-assignment-unq-c2/893221)

<div class="topic-metadata">

**Author:** [@olesaprhdk](https://community.deeplearning.ai/u/olesaprhdk)\
**Replies:** 3\
**Last updated:** [July 2, 2026, 1:29pm UTC](https://community.deeplearning.ai/t/c3-w1-assignment-unq-c2/893221 "2026-07-02T13:29:04Z")

</div>

Hello, I am trying to add the formulas as it was shown in the course lab notebooks, but receiving an error with type mismatch and the wrong variable positioning; what can it be?

---

## [An unexpected error occurred. Please try again later in "Survival Estimates that Vary with Time" Notebook submission](https://community.deeplearning.ai/t/an-unexpected-error-occurred-please-try-again-later-in-survival-estimates-that-vary-with-time-notebook-submission/892406)

<div class="topic-metadata">

**Author:** [@Tahir\_Yamin](https://community.deeplearning.ai/u/Tahir_Yamin)\
**Replies:** 2\
**Last updated:** [May 23, 2026, 6:46pm UTC](https://community.deeplearning.ai/t/an-unexpected-error-occurred-please-try-again-later-in-survival-estimates-that-vary-with-time-notebook-submission/892406 "2026-05-23T18:46:26Z")

</div>

An unexpected error occurred. Please try again later in “Survival Estimates that Vary with Time” Notebook submission

---

## [Assignment problems](https://community.deeplearning.ai/t/assignment-problems/892276)

<div class="topic-metadata">

**Author:** [@Amrit\_Pokhrel](https://community.deeplearning.ai/u/Amrit_Pokhrel)\
**Replies:** 2\
**Last updated:** [May 18, 2026, 12:04pm UTC](https://community.deeplearning.ai/t/assignment-problems/892276 "2026-05-18T12:04:45Z")

</div>

Assignment Problems I didn’t understand the assignment. What should I do next to go to chest x-ray diagnosis module.

---

## [Hi I'm new here! Nice to meet you all](https://community.deeplearning.ai/t/hi-im-new-here-nice-to-meet-you-all/892003)

<div class="topic-metadata">

**Author:** [@andrea1201](https://community.deeplearning.ai/u/andrea1201)\
**Replies:** 1\
**Last updated:** [May 5, 2026, 4:47pm UTC](https://community.deeplearning.ai/t/hi-im-new-here-nice-to-meet-you-all/892003 "2026-05-05T16:47:28Z")

</div>

Very excited to take this course!

---

## [Unable to get course completion for AI For Medicine](https://community.deeplearning.ai/t/unable-to-get-course-completion-for-ai-for-medicine/892004)

<div class="topic-metadata">

**Author:** [@andrea1201](https://community.deeplearning.ai/u/andrea1201)\
**Replies:** 2\
**Last updated:** [May 5, 2026, 3:27am UTC](https://community.deeplearning.ai/t/unable-to-get-course-completion-for-ai-for-medicine/892004 "2026-05-05T03:27:14Z")

</div>

I am not using paid version, but I made sure I watched every video and did all the reading materials. However, I still have 98% completion for Course 3, and I have no idea what that 2% is for. Does anyone know how to fix…

---

## [C1W3 Assignment potential problem with predict\_and\_viz function](https://community.deeplearning.ai/t/c1w3-assignment-potential-problem-with-predict-and-viz-function/890421)

<div class="topic-metadata">

**Author:** [@user440](https://community.deeplearning.ai/u/user440)\
**Replies:** 1\
**Last updated:** [March 16, 2026, 6:26pm UTC](https://community.deeplearning.ai/t/c1w3-assignment-potential-problem-with-predict-and-viz-function/890421 "2026-03-16T18:26:11Z")

</div>

Hi, @Deepti\_Prasad At the end of the assignment notebook Brain Tumor Auto-Segmentation for Magnetic Resonance Imaging (MRI) in section 5.3 a function predict\_and\_viz(image, label, model, threshold) able to run on ent…

---

## [Programming Assignment: Brain Tumor Auto-Segmentation for Magnetic Resonance Imaging (MRI)](https://community.deeplearning.ai/t/programming-assignment-brain-tumor-auto-segmentation-for-magnetic-resonance-imaging-mri/890320)

<div class="topic-metadata">

**Author:** [@AhmedFahmy97](https://community.deeplearning.ai/u/AhmedFahmy97)\
**Replies:** 5\
**Last updated:** [March 15, 2026, 12:29pm UTC](https://community.deeplearning.ai/t/programming-assignment-brain-tumor-auto-segmentation-for-magnetic-resonance-imaging-mri/890320 "2026-03-15T12:29:55Z")

</div>

I keep getting that error below everytime once I submit the test : Cell #6. Can’t compile the student’s code. Error: AssertionError(‘Not all tests were passed for get\_sub\_volume. Check your equations and avoid using glo…

---

## [AI for Medicine - AI for Medical Treatment W1Assignment](https://community.deeplearning.ai/t/ai-for-medicine-ai-for-medical-treatment-w1assignment/890197)

<div class="topic-metadata">

**Author:** [@tmmg](https://community.deeplearning.ai/u/tmmg)\
**Replies:** 6\
**Last updated:** [March 12, 2026, 7:45pm UTC](https://community.deeplearning.ai/t/ai-for-medicine-ai-for-medical-treatment-w1assignment/890197 "2026-03-12T19:45:39Z")

</div>

Hi, I need help with this assignment. I don’t understand why the solution to exercises 7-8-9 gives me a result different from expected. Who can help me with the solution?

---

## [Risk Models Using Tree-based Models](https://community.deeplearning.ai/t/risk-models-using-tree-based-models/889222)

<div class="topic-metadata">

**Author:** [@AREPRADEEPTHI\_2025](https://community.deeplearning.ai/u/AREPRADEEPTHI_2025)\
**Replies:** 5\
**Last updated:** [February 21, 2026, 4:41pm UTC](https://community.deeplearning.ai/t/risk-models-using-tree-based-models/889222 "2026-02-21T16:41:42Z")

</div>

“UNQ\_C3, C5, C6 all fail with: ValueError(‘Event times and predictions must have the same shape’). My util.py cindex is: return lifelines.utils.concordance\_index(y\_true, scores). C1, C2, C4 all pass. What is wrong with h…

---

## [Risk Models Using Tree-based Model](https://community.deeplearning.ai/t/risk-models-using-tree-based-model/889223)

<div class="topic-metadata">

**Author:** [@AREPRADEEPTHI\_2025](https://community.deeplearning.ai/u/AREPRADEEPTHI_2025)\
**Replies:** 1\
**Last updated:** [February 21, 2026, 1:11pm UTC](https://community.deeplearning.ai/t/risk-models-using-tree-based-model/889223 "2026-02-21T13:11:22Z")

</div>

I AM DOING THIS ASSIGNMENT, AND I AM NOT ABLE TO COMPLETE THIS ASSIGNMENT AFTER SO MANY TRIALS. CAN I GET HELP WHERE AM GOING WRONG? …

---

## [Building linear model practical assignment](https://community.deeplearning.ai/t/building-linear-model-practical-assignment/885927)

<div class="topic-metadata">

**Author:** [@AREPRADEEPTHI\_2025](https://community.deeplearning.ai/u/AREPRADEEPTHI_2025)\
**Replies:** 13\
**Last updated:** [February 21, 2026, 6:33am UTC](https://community.deeplearning.ai/t/building-linear-model-practical-assignment/885927 "2026-02-21T06:33:40Z")

</div>

week module 1 i have done the assignment in Building linear models practice assignmet. when i do the exercise all my 4 exercises anre passed. but whe \[Build and Evaluate a Linear Risk model answers.docx|attachmentAssi…

---

## [AI for Medical Diagnosis C1\_W3 Assignment Assertion Error for exercise 5](https://community.deeplearning.ai/t/ai-for-medical-diagnosis-c1-w3-assignment-assertion-error-for-exercise-5/887443)

<div class="topic-metadata">

**Author:** [@Minupama\_h](https://community.deeplearning.ai/u/Minupama_h)\
**Replies:** 3\
**Last updated:** [January 20, 2026, 6:58am UTC](https://community.deeplearning.ai/t/ai-for-medical-diagnosis-c1-w3-assignment-assertion-error-for-exercise-5/887443 "2026-01-20T06:58:38Z")

</div>

Hi, I’m currently getting an Assertion Error for exercise 5 in the programming assignment C1\_W3 no matter what I try, so I’m a bit confused and was hoping you could help me understand what’s going wrong. Every other ex…

---

## [C1\_W1\_Programming\_Assingment](https://community.deeplearning.ai/t/c1-w1-programming-assingment/886712)

<div class="topic-metadata">

**Author:** [@Minupama\_h](https://community.deeplearning.ai/u/Minupama_h)\
**Replies:** 3\
**Last updated:** [January 11, 2026, 1:38pm UTC](https://community.deeplearning.ai/t/c1-w1-programming-assingment/886712 "2026-01-11T13:38:08Z")

</div>

Programming Assignment: Chest X-Ray Medical Diagnosis with Deep Learning Hi, I am currently doing the week 1 module 1 programming assignment and I ran into a NameError with the cell that contains: check\_for\_leakage\_tes…

---

## [U-Net video mentioned does not exist](https://community.deeplearning.ai/t/u-net-video-mentioned-does-not-exist/885191)

<div class="topic-metadata">

**Author:** [@lschettini](https://community.deeplearning.ai/u/lschettini)\
**Replies:** 7\
**Last updated:** [December 23, 2025, 7:36am UTC](https://community.deeplearning.ai/t/u-net-video-mentioned-does-not-exist/885191 "2025-12-23T07:36:42Z")

</div>

Hello, in optional session for learning more about U-Net, the course points us to the authors website, where we should fine a video introducing the model. This video is no longer available and thus it would be great to …

---

## [Question in the AI for medical diagnosis](https://community.deeplearning.ai/t/question-in-the-ai-for-medical-diagnosis/885326)

<div class="topic-metadata">

**Author:** [@Nesren](https://community.deeplearning.ai/u/Nesren)\
**Replies:** 1\
**Last updated:** [December 19, 2025, 1:17pm UTC](https://community.deeplearning.ai/t/question-in-the-ai-for-medical-diagnosis/885326 "2025-12-19T13:17:31Z")

</div>

Function “K.mean or tf.keras.backend.mean” not found in Code Cell UNQ\_C5. Code Cell UNQ\_C1: Function ‘get\_sub\_volume’ is correct. Code Cell UNQ\_C2: Function ‘standardize’ is incorrect. Check implementation. Code Cell …

---

## [Autograder not working](https://community.deeplearning.ai/t/autograder-not-working/144380)

<div class="topic-metadata">

**Author:** [@Bradley\_Merrill\_Thom](https://community.deeplearning.ai/u/Bradley_Merrill_Thom)\
**Replies:** 12\
**Last updated:** [December 17, 2025, 8:04pm UTC](https://community.deeplearning.ai/t/autograder-not-working/144380 "2025-12-17T20:04:14Z")

</div>

All of my answers are correct, but I get a zero on the autograder. The only error message I get in the notebook itself is for excercise 1, where it says "Error: Wrong shape. " The output is a float, there should be no …

---

## [Issues with image pre-processing approach](https://community.deeplearning.ai/t/issues-with-image-pre-processing-approach/885193)

<div class="topic-metadata">

**Author:** [@lschettini](https://community.deeplearning.ai/u/lschettini)\
**Replies:** 2\
**Last updated:** [December 17, 2025, 10:40am UTC](https://community.deeplearning.ai/t/issues-with-image-pre-processing-approach/885193 "2025-12-17T10:40:50Z")

</div>

Hello, I have some questions and concerns about the image preprocessing approach used in Week 1’s lab. Regarding the normalization method: The lab uses ImageDataGenerator with samplewise normalization (centering and s…

---

## [C1W2 Assignment typo](https://community.deeplearning.ai/t/c1w2-assignment-typo/883481)

<div class="topic-metadata">

**Author:** [@Thomas\_A\_W](https://community.deeplearning.ai/u/Thomas_A_W)\
**Replies:** 2\
**Last updated:** [December 16, 2025, 1:50pm UTC](https://community.deeplearning.ai/t/c1w2-assignment-typo/883481 "2025-12-16T13:50:44Z")

</div>

I noticed a minor typo in the C1W2 Assignment. In the output of the 7th cell which executes the function get\_tp\_tn\_fp\_fn\_test, the word “calculated” is misspelled “calcualted“. It is misspelled in both the function and t…

---

## [C2\_W4 UNQ\_C2 - wrong answer for Hazard Ratio](https://community.deeplearning.ai/t/c2-w4-unq-c2-wrong-answer-for-hazard-ratio/884679)

<div class="topic-metadata">

**Author:** [@Thomas\_A\_W](https://community.deeplearning.ai/u/Thomas_A_W)\
**Replies:** 3\
**Last updated:** [December 9, 2025, 7:56pm UTC](https://community.deeplearning.ai/t/c2-w4-unq-c2-wrong-answer-for-hazard-ratio/884679 "2025-12-09T19:56:35Z")

</div>

Hello @Deepti\_Prasad I’m running into a problem with C2W4 Programming Assignment cell UNQ\_C2. I see that you’ve helped other people with similar problems. When run in the next cell the hazard ratio value from my code i…

[Next page](https://community.deeplearning.ai/c/course-q-a/ai-for-medicine/43.md?page=1)
