Skip to main content

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.5.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.0.5.tar.gz (60.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: ComputationalGraphPrimer-1.0.5.tar.gz
  • Upload date:
  • Size: 60.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for ComputationalGraphPrimer-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3c646e9a402429277e5bdc2f87c573486c4b7d2cc49b569ed4e261d3c4139649
MD5 44999fb82139f7565b8bd388e154f944
BLAKE2b-256 496f6acc22cf731752ca242acf1cc4a7830b3beb4a130d8acce251c6e64a0c0f

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