Questions tagged [pyro]

Pyro is a library that enables you to build applications in which PYthon Remote Objects can talk to each other over the network, with minimal programming effort.

Pyro is a library that enables you to build applications in which Python remote objects can talk to each other over the network, with minimal programming effort.

You use normal Python method calls, with almost every possible parameter and return value type, and Pyro takes care of locating the right object on the right computer to execute the method. It is designed to be very easy to use, and to, generally, be non-obtrusive.

Pyro also provides a set of powerful features that enables you to build distributed applications rapidly and effortlessly. Pyro is written in 100% pure Python and therefore runs on many platforms and Python versions.

176 questions
0
votes
0 answers

Pyro GP: gpmodel.parameters() does not reflect assigned value

Code. X, and y should be irrelevant.. ker = gp.kernels.RBF(input_dim=2,variance=torch.tensor(1.), lengthscale=torch.ones((2,))) gpr = gp.models.GPModel(kernel=ker, X=x, y=y) Input: list(gpr.parameters()) Output: [0]: [Parameter…
Ben K
  • 37
  • 6
0
votes
0 answers

Bayesian models for CNN using Pyro & Pytorch

I am applying a Bayesian model for a CNN that has many layers (more than 3), using Stochastic Variational Inference in Pyro Package. However after defining the NN, Model and Guide functions and running the training loop I found that the loss stops…
0
votes
0 answers

Python pyro remote call returns error with argument

I have pyro4 blockchain class to create transfers and add them to blockchain. This file has the class implementation: import Pyro4 @Pyro4.expose class MyBlockChain(object): # constructor def __init__(self, chainName): self.set_head(None) …
Ahmed Can Unbay
  • 2,694
  • 2
  • 16
  • 33
0
votes
0 answers

pyro 4 python AttributeError exposing private names pyro4

I want to access a variable which is passed through parameter using pyro4, so it is a private class like this. class MyBlockChain(object): # constructor def __init__(self, chainName): self.head = None self.chainName = chainName …
Ahmed Can Unbay
  • 2,694
  • 2
  • 16
  • 33
0
votes
0 answers

Pyro - Extracting Individual Kernels from GPRegression

I'm trying to understand how to extract the individual kernels from a GPRegression object similar to how the Birthday problem is approached in BDA3. Using the example from Pyro's documentation: X = torch.linspace(-5, 5, 100) y = torch.sin(X * 8) + 2…
JBlaz
  • 81
  • 1
  • 4
0
votes
0 answers

how to make prediction in bayesian convolutional neural network using pyro and pytorch

I'm trying to classify the sign language hand gesture images using Bayesian CNN, I made the following code: class BCNN(PyroModule): def __init__(self): super(BCNN, self).__init__() self.conv1 =…
0
votes
0 answers

possible fix of " enclose the batched tensor in a with pyro.plate(...): context "

In this example, the guide step is defined as follows def guide(params): # returns the Bernoulli probablility alpha = pyro.param( "alpha", torch.tensor(params[0]), constraint=constraints.positive ) beta = pyro.param( …
user785099
  • 5,323
  • 10
  • 44
  • 62
0
votes
0 answers

How do I get block details in a Pyro CMS twig file?

The url contains a block id, such as this domain/playlist/PLQB0d-uOBCP2vyGFcj3nw252x9CtupDH1/{blockid}. How do I get all of the information from the block id into the twig file?
0
votes
1 answer

How does Pyro perform operations with Random Variables?

In Pyro there is a new experimental container class: Random Variables Using Random Variables you can write something like this: from pyro.distributions.torch import Normal X = Normal(5, 1).rv Y = Normal(20, 3).rv Z = 3*X + Y where X,Y,Z are…
guruste
  • 5
  • 1
  • 1
  • 4
0
votes
3 answers

slice Pytorch tensors which are saved in a list

I have the following code segment to generate random samples. The generated samples is a list, where each entry of the list is a tensor. Each tensor has two elements. I would like to extract the first element from all tensors in the list; and…
user785099
  • 5,323
  • 10
  • 44
  • 62
0
votes
1 answer

RuntimeError: Trying to backward through the graph a second time

I'm trying to train 'trainable Bernoulli distribution' using 'pyro'. I want to train Bernoulli distribution's parameter(probability to win) using NLL loss. train_data is one-hot encoded sparse matrix(2034,19475) and train_labels has 4 value(4 class,…
js kim
  • 3
  • 1
0
votes
1 answer

(, ProtocolError('invalid data or unsupported protocol version'), )

I am trying to connect to an OPC DA server, but I get the following error: (, ProtocolError ('invalid data or unsupported protocol version'), ) I am using python 3 and my…
neural_krobus
  • 73
  • 2
  • 6
0
votes
1 answer

Pyro and conditional probability

I'm working my way through this tutorial: An Introduction to Inference in Pyro What I don't understand is the following. In order to get (|,=9.5) we can use the pyro.condition function with def scale(guess): weight = pyro.sample("weight",…
f_3464gh
  • 162
  • 3
  • 11
0
votes
2 answers

Unable to import PyroModule

I am trying to import PyroModule using: from pyro.nn import PyroModule but, I am getting this error: ImportError: cannot import name 'PyroModule' from 'pyro.nn' (/home/karima/anaconda3/envs/my_env/lib/python3.7/site-packages/pyro/nn/init.py) Here is…
0
votes
2 answers

Getting error while trying to install Pyro Library

I'm getting this error whenever I try to install PyRO: ERROR: Command errored out with exit status 1: command: 'c:\users\singh\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] =…