繁体   English   中英

有什么方法可以增加分配给 jupyter notebook 的内存

[英]Is there any way to increase memory assigned to jupyter notebook

我正在使用 python3.6

当我尝试在 pymc3 中运行 NUTS 采样时,我的 jupyter 笔记本一次又一次崩溃。

我的笔记本电脑有 16GB 和 i7,我认为应该足够了。 我在 8gb 和 i7 笔记本电脑上运行了相同的代码,当时它工作正常。 无法弄清楚这个问题是什么。

我已经用这个命令为 jupyter 生成了配置文件

$ jupyter notebook --generate-config

我无法弄清楚我需要修改哪个参数来解决这个问题。

这是我正在使用的代码

with pm.Model() as model:
#hyperpriors
home = pm.Flat('home') #flat pdf is uninformative - means we have no idea
sd_att = pm.HalfStudentT('sd_att', nu=3, sd=2.5)
sd_def = pm.HalfStudentT('sd_def', nu=3, sd=2.5)
intercept = pm.Flat('intercept')

# team-specific model parameters
atts_star = pm.Normal("atts_star", mu=0, sd=sd_att, shape=num_teams)
defs_star = pm.Normal("defs_star", mu=0, sd=sd_def, shape=num_teams)

# To allow samples of expressions to be saved, we need to wrap them in pymc3 
Deterministic objects
atts = pm.Deterministic('atts', atts_star - tt.mean(atts_star))
defs = pm.Deterministic('defs', defs_star - tt.mean(defs_star))

# Assume exponential search on home_theta and away_theta. With pymc3, need to 
rely on theano.
# tt is theano.tensor.. why Sampyl may be easier to use..
home_theta = tt.exp(intercept + home + atts[home_team] + defs[away_team])  
away_theta = tt.exp(intercept + atts[away_team] + defs[home_team])

# likelihood of observed data
home_points = pm.Poisson('home_points', mu=home_theta, 
observed=observed_home_goals)
away_points = pm.Poisson('away_points', mu=away_theta, 
observed=observed_away_goals)

这也是错误sc:

第一秒

第二节

是的,您可以在激活环境后使用以下命令:

jupyter notebook --NotbookApp.iopub_Data_Rate_Limit=1e10

如果您需要更多或更少的内存更改 1e10。 默认为 1e6。

其实这不是内存问题。

Jupyter 收到此错误的原因有很多,例如浏览器问题,每当它在 SAFARI 上运行时都会引发此错误。 如果 Google Chrome 不是默认浏览器,也会出现同样的问题。

Jupyter 现在不适用于 Tornado 服务器版本 6.0.1,请使用另一个版本的 Tornado。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM