有什么办法可以增加分配给jupyter笔记本的内存 [英] Is there any way to increase memory assigned to jupyter notebook

查看:1073
本文介绍了有什么办法可以增加分配给jupyter笔记本的内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用python3.6

I am using python3.6

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

My jupyter notebook is crashing again and again when I try to run NUTS sampling in pymc3.

我的笔记本电脑有16GB和i7,我认为应该足够了.我在8gb和i7笔记本电脑上运行了相同的代码,并且在那个时候起作用了.无法弄清楚这是什么问题.

My laptop has 16gb and i7 I think it should be enough. I ran same code on 8gb and i7 laptop and it worked that time. Not able to fig out what the issue is in this one.

我已使用此命令为jupyter生成了配置文件

I have generated the config file for jupyter with this command

$ jupyter notebook --generate-config

我无法确定需要修改哪个参数来解决此问题.

I am not able to fig out which parameter I need to modify to tackle this issue.

这是我正在使用的代码

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:

推荐答案

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

Yes, you can use the following command after activating your environment:

jupyter notebook --NotbookApp.iopub_Data_Rate_Limit=1e10

如果需要更多或更少的内存,请更改1e10.默认情况下为1e6.

If you need more or less memory change 1e10. By default it is 1e6.

这篇关于有什么办法可以增加分配给jupyter笔记本的内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆