Skip to content

Cost Function in Backpropagation_Algorithm_using_Softmax #2

@Legitao

Description

@Legitao

The line to calculate the cost of Softmax output is not quite correct. Since Y and A are of shape (n_categories, batch_size), the cost should be
image

So I think the correct version should be np.mean(-np.sum(Y * np.log(A.T), axis=0))

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