Programming > STUDY GUIDE > softmax_regression.[A+ GUIDE] (All)
# Do not use packages that are not in standard distribution of python import numpy as np from ._base_network import _baseNetwork class SoftmaxRegression(_baseNetwork): def __init__(self, input_siz... e=28*28, num_classes=10): ''' A single layer softmax regression. The network is composed by: a linear layer without bias => (optional ReLU activation) => Softmax :param input_size: the input dimension :param num_classes: the number of classes in total ''' super().__init__(input_size, num_classes) self._weight_init() def _weight_init(self): ''' initialize weights of the single layer regression network. No bias term included. :return: None; self.weights is filled based on method - W1: The weight matrix of the linear layer of shape (num_features, hidden_size) ''' np.random. [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Nov 03, 2022
Number of pages
3
Written in
This document has been written for:
Uploaded
Nov 03, 2022
Downloads
0
Views
318
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·