# Tensorflow\_Introduction

**URL:** <https://community.deeplearning.ai/t/tensorflow-introduction/7381>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [May 19, 2021, 4:29am UTC](https://community.deeplearning.ai/t/tensorflow-introduction/7381 "2021-05-19T04:29:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![panicpotatoe](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/panicpotatoe/32/309_2.png) [@panicpotatoe](https://community.deeplearning.ai/u/panicpotatoe)\
**Post date:** [May 19, 2021, 4:29am UTC](https://community.deeplearning.ai/t/tensorflow-introduction/7381/1 "2021-05-19T04:29:37Z")

</div>

in the test assignment, Cost Function section, I used

`cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=labels))`

but the output was

`AssertionError: Test does not match. Did you get the mean of your cost functions?`

I don’t know what was wrong here… That only one line of code which cost me 40 points to pass the test… Anybody can help?

---

<div class="post-metadata">

**Author:** ![nramon](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nramon/32/129097_2.png) [@nramon](https://community.deeplearning.ai/u/nramon)\
**Post date:** [May 19, 2021, 2:15pm UTC](https://community.deeplearning.ai/t/tensorflow-introduction/7381/2 "2021-05-19T14:15:02Z")

</div>

Hi, @panicpotatoe.

You’re not using the right [loss function](https://www.tensorflow.org/api_docs/python/tf/keras/losses/binary_crossentropy) 🙂
