[P] Deep Neural Network implemented in pure SQL over BigQuery • r/MachineLearning
Aw come on now, if you're going to implement this in a database: use the database. Store the weights and biases in a table, and use JOIN and GROUP BY operations to form the dot products. If you reformulate the inputs as a design matrix, you can store the weights and biases for each layer in a single table. In addition to making your code readable, this has the added benefit that the update operation can be implemented as a literal update (i.e. on the weights table) as opposed to running a pass through the network to output new weights which then need to be passed in directly to a new select statement. The way the author implemented it, it would be extremely expensive just on the client's bandwidth to run either a forward or backwards pass on a large model since you'd need to pass all of the parameters over the connection twice for a single update. The database should store and manage all the parameters.
Mar-14-2018, 02:46:19 GMT
- Technology: