An educational module meant to serve as a prelude to talking about automatic differentiation in deep learning frameworks (such as in the Autograd module of PyTorch)
Project description
Consult the module API page at
https://engineering.purdue.edu/kak/distCGP/ComputationalGraphPrimer-1.0.9.html
for all information related to this module, including information related to the latest changes to the code.
from ComputationalGraphPrimer import * cgp = ComputationalGraphPrimer( expressions = ['xx=xa^2', 'xy=ab*xx+ac*xa', 'xz=bc*xx+xy', 'xw=cd*xx+xz^3'], output_vars = ['xw'], dataset_size = 10000, learning_rate = 1e-6, grad_delta = 1e-4, display_vals_how_often = 1000, ) cgp.parse_expressions() cgp.display_network1() cgp.gen_gt_dataset(vals_for_learnable_params = {'ab':1.0, 'bc':2.0, 'cd':3.0, 'ac':4.0}) cgp.train_on_all_data() cgp.plot_loss()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for ComputationalGraphPrimer-1.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47420314e260ba1d4453b4ab81f6983a86ca2b91fae9aca39f9a3f05cd0038b |
|
MD5 | 9a1e78b8009fe31fed5476f4b5af97c7 |
|
BLAKE2b-256 | 673d4437b242a6146c5e12969fe8e6ad621f5390d56ae62fac081fe815364868 |