中二柚 · 提问于2021.08.05浏览量:615我在paddle改写波士顿房价预测代码运行时报错,如下:
`class Regressor(fluid.dygraph.Layer):
def init(self):
super(Regressor, self).init()
# 定义一层全连接层,输出维度是1,激活函数为None,即不使用激活函数self.fc = Linear(input_dim=13, output_dim=1, act=None)# 网络的前向计算函数def forward(self, inputs):x = self.fc(inputs)return x
with fluid.dygraph.guard():
# 声明定义好的线性回归模型model = Regressor()# 开启模型训练模式model.train()# 加载数据training_data, test_data = load_data()# 定义优化算法,这里使用随机梯度下降-SGD# 学习率设置为0.01opt = fluid.optimizer.SGD(learning_rate=0.01, parameter_list=model.parameters())
Error: Need to Create DeviceContextPool first!
[Hint: pool should not be null.] at (/paddle/paddle/fluid/platform/device_context.h:336)`

重启一下,再次执行就好啦,因为在计算过程中与服务器失去连接,某些中间变量出错了。
百度Carlife无法使用酷狗音乐、网易云音乐等听歌软件
+1
原车不带CarLife+后改的安卓大屏机 有什么办法可以装上CarLife+
Hello World!
https://cloud.189.cn/t/rYbMbeNfENfq (访问码:k6f2) 车机端 3.0
https://cloud.189.cn/t/b6rYZzZbaaU3 (访问码:au3o) 车机端 4.0
CarLife车机修改版本方法
感谢分享
无法将手机百度地图app上的行程通过carlife分享至车载屏
已经开始导航会这样,在开始导航前面分享就好了

车机终端Carlife升级Carlife+
怎么安装第三方,我不会
相关问题