Skip to main content

An educational module meant to serve as a prelude to talking about automatic differentiation in deep learning frameworks (for example, as provided by the Autograd module in PyTorch)

Project description

Consult the module API page at

https://engineering.purdue.edu/kak/distCGP/ComputationalGraphPrimer-1.1.1.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ComputationalGraphPrimer-1.1.1.tar.gz (76.7 kB view details)

Uploaded Source

File details

Details for the file ComputationalGraphPrimer-1.1.1.tar.gz.

File metadata

File hashes

Hashes for ComputationalGraphPrimer-1.1.1.tar.gz
Algorithm Hash digest
SHA256 ef3bd3335517d4e07937a760e7319b7c0856ffcf0e64a1ad513eda0bfbc6f986
MD5 696c666fec0bc460e194d945620c6653
BLAKE2b-256 1b1d8bb60091ce4511b8e8ee47022fa816a464e326a603b428abe7eb0c5cac33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page