Hi @fehiepsi and all,

I’d like to model a time series as a parametric trend + a nonparametric residual. Currently I’m using `scipy.optimize.curve_fit`

to model the trend and using `pyro.contrib.gp`

to model residuals wrt this trend. Is there a way to do this all in Pyro, say using syntax like

```
residual_model = pyro.gp.models.GPRegression(...) # <--- not quite right...
def model(x, y):
a = pyro.param("a", torch.tensor(0.0))
b = pyro.param("b", torch.tensor(1.0))
trend = a * x + b
residual = y - trend
pyro.sample("residual", residual_model, obs=residual) # <--- desired syntax
```