Skip to content

mlp_mnist_simple.ipynb => softmax_cross_entropy_with_logits with named arguments (labels=..., logits=..., ...)Β #17

@aydenkim

Description

@aydenkim

About https://github.com/sjchoi86/Tensorflow-101/blob/master/notebooks/mlp_mnist_simple.ipynb

Recently updated Tensorflow (1.4) will make the following error.

ValueError: Only call softmax_cross_entropy_with_logits with named arguments (labels=..., logits=..., ...)

Just simply adding named arguments will solve this issue.

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

FYI, http://www.edwith.org/deeplearningchoi/lecture/15552/ has the right code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions