GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Get rid of scipy dependency by using numpy. · mpage/DeepLearningTutorials@407fd81

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • code/hmc
    • test_hmc.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/hmc/test_hmc.py‎

Copy file name to clipboardExpand all lines: code/hmc/test_hmc.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import numpy
2-
from scipy import linalg
32
import theano
43

54
from hmc import HMC_sampler
@@ -15,7 +14,7 @@ def sampler_on_nd_gaussian(sampler_cls, burnin, n_samples, dim=10):
1514
cov = numpy.array(rng.rand(dim, dim), dtype=theano.config.floatX)
1615
cov = (cov + cov.T) / 2.
1716
cov[numpy.arange(dim), numpy.arange(dim)] = 1.0
18-
cov_inv = linalg.inv(cov)
17+
cov_inv = numpy.linalg.inv(cov)
1918

2019
# Define energy function for a multi-variate Gaussian
2120
def gaussian_energy(x):

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.