What is the role of the categorical_crossentropy loss function in a multiclass classification model in TensorFlow?
4 phương ánCó giải thích
Các phương án trả lời
Chọn một phương ánLời giảiChọn phương án để mở
Đáp án đúng: "It measures the dissimilarity between predicted and true class distributions.". categorical_crossentropy tính L = −Σ y_i·log(p_i) giữa nhãn one-hot y và phân phối xác suất p do lớp Dense softmax đưa ra; vì y chỉ có một vị trí bằng 1 nên loss bằng −log của xác suất gán cho lớp đúng, càng gần 0 khi mô hình tự tin đúng và tăng mạnh khi đoán sai, nhờ đó gradient đẩy xác suất lớp đúng lên. "It calculates the mean squared error between predictions and true labels." sai vì đó là mean_squared_error, phù hợp cho hồi quy chứ không phải hàm này. "It evaluates the cosine similarity between feature vectors." sai vì độ tương đồng cosin đo góc giữa hai vector, ứng với loss CosineSimilarity dùng cho embedding, không phải entropy chéo. "The categorical_crossentropy loss is not used for multiclass classification." sai vì đây chính là hàm mất mát chuẩn cho phân loại nhiều lớp với nhãn one-hot.
Cùng phần 2
In the context of creating a new model with a pre-trained model in TensorFlow, what is the benefit of transfer learning?Có lời giảiCâu hỏiWhat is a typical representation of training and validation accuracies on a plot?Có lời giảiCâu hỏiTypical input size for ImageNet-pretrained InceptionV3 is:Có lời giảiCâu hỏiCả 36 câu của chủ đề36 câu