t_det = de_parallel(t_model).model[-1] UnboundLocalError: local variable 't_model' referenced before assignment
时间: 2024-05-28 13:13:11 浏览: 17
这个错误通常是因为你在使用 `t_model` 变量之前没有对其进行赋值。
可能的原因是你没有正确地定义 `t_model` 变量或者在函数中没有将其作为参数传递。
你需要检查一下你的代码,确保在使用 `t_model` 变量之前已经对其进行了正确的赋值。如果是在函数中使用的变量,需要将其作为参数传递或者在函数内部进行正确的定义。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)