我正在尝试训练线性回归模型来预测金县的房价。我一步一步地遵循了教程。但是,当我最小化损失函数时,我得到了错误:
'RefVariable' object has no attribute '_id'
Run Code Online (Sandbox Code Playgroud)
我正在学习一个简单的教程,以学习如何训练简单的线性回归模型。我真的无法找到有关此类错误的任何信息。请注意,我在这个项目中使用了 Google Colab。这是整个错误:
'RefVariable' object has no attribute '_id'
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
<ipython-input-31-17eaadb45902> in <module>()
15 #minimize the loss function
16
---> 17 opt.minimize(lambda: loss_function(intercept,slope,price_batch,size_batch),var_list=[intercept,slope])
18
19
3 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/tape.py in watch(tape, tensor)
57 def watch(tape, tensor):
58 """Marks this tensor to be watched by the given tape."""
---> 59 pywrap_tensorflow.TFE_Py_TapeWatch(tape._tape, tensor) # pylint: disable=protected-access
60
61
SystemError: <built-in …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 TexStudio 中将 .tex 文档编译为 pdf(我也在 MikTex 中尝试过)并输出以下错误File l3backend-pdfmode.def not found。我试过下载 13backend 包,但没有成功。我需要将包裹放在特定的文件夹中吗?
我正在写一本关于紧绑定理论的 Google Colab Notebook。我想在降价单元格或代码单元格中显示图像,就像在 Anaconda 中可以使用以下代码一样
from IPython.display import Image # needed to embed an image
Image(filename='example.png', embed=True)
Run Code Online (Sandbox Code Playgroud)
我试过在 Google Colab 中这样做:
from IPython.display import Image
Image('example.png')
Run Code Online (Sandbox Code Playgroud)
它运行并没有显示任何内容。
我已经读过这种方式也是可能的:
将您的图像放在 /usr/local/share/jupyter/nbextensions/google.colab/
<img src='/nbextensions/google.colab/image.png' /> ```
Run Code Online (Sandbox Code Playgroud)我真的不明白这最后的做法。就像第一步是我计算机中的一个目录(我已经尝试寻找它但它不存在)?
有没有更简单的方法来解决这个问题?
编辑:我现在意识到该目录适用于 LINUX 操作系统。无论如何我可以在 Windows 中做一些等效的事情(我的电脑运行 Windows)