GithubHelp home page GithubHelp logo

mhar's People

Contributors

uumami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

cabra1391 dymil

mhar's Issues

Running time problem for high dimensions

Hi Mario,
Thanks for your research and this repository!

I'm trying to use the repository but encounter unreasonable running times for high dimensions. The results reported in the paper seem much better so I assume I'm missing something.

I have N+1 points in N dimensions, defining a convex polytope/hull.
For a small N, the code seems to run perfectly. However, when using N~300, which is my real use case, the "walk" function simply doesn't temrminate.

A minimal example to repoduce my code is attached below.

from mhar import walk
import numpy as np
from scipy.spatial import ConvexHull
import torch

n = torch.cuda.device_count()
print(n)

N=300
pts = np.random.rand(N+1, N)
hull = ConvexHull(pts)

ai = torch.from_numpy(hull.equations[:,:-1]).to(torch.float32).cuda()
bi = torch.from_numpy(-1 * hull.equations[:,-1]).unsqueeze(1).to(torch.float32).cuda()
x_0 = torch.from_numpy(np.mean(pts, axis=0)).unsqueeze(1).to(torch.float32).cuda()

X = walk(z=5, # Padding Parameter
     ai=ai, # Inequality matrix
     bi=bi, # Inequaliy restrictions
     ae=torch.empty(0), # Equality Matrix
     be=torch.empty(0), # Equality restriction
     x_0=x_0, # Inner Point of the polytope
     T=1, # Number of iid Iterations
     device='cuda', # Device to use cpu or cuda
     warm=0, # Number of iid iterations to burn before saving samples
     seed=None, # Automatic random seed
     thinning=None # Automatic thinning factor of O(n^3)
     )

In the paper, Table B.5, for hypercube with n=500 and z=4000 - running time is reported to be 27.5 seconds.
The code above has been running for an hour now and not terminating.
Could you please help me understanding what I'm missing?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.