在使用过程中pip install tf-models-official
,我在安装库时发现了以下问题:-
Collecting tf-models-official\n Using cached tf_models_official-2.8.0-py2.py3-none-any.whl (2.2 MB)\nRequirement already satisfied: Pillow in c:\\users\\user\\documents\\python scripts\\number_plate_recognition\\anprsys\\lib\\site-packages (from tf-models-official) (9.0.1)\nCollecting gin-config\n Using cached gin_config-0.5.0-py3-none-any.whl (61 kB)\nCollecting seqeval\n Using cached seqeval-1.2.2-py3-none-any.whl\nRequirement already satisfied: tensorflow~=2.8.0 in c:\\users\\user\\documents\\python scripts\\number_plate_recognition\\anprsys\\lib\\site-packages (from tf-models-official) (2.8.0)\nCollecting tensorflow-datasets\n Using cached tensorflow_datasets-4.5.2-py3-none-any.whl (4.2 MB)\nRequirement already satisfied: six in c:\\users\\user\\documents\\python scripts\\number_plate_recognition\\anprsys\\lib\\site-packages (from tf-models-official) (1.16.0)\nRequirement already satisfied: scipy>=0.19.1 in c:\\users\\user\\documents\\python scripts\\number_plate_recognition\\anprsys\\lib\\site-packages (from tf-models-official) (1.8.0)\nCollecting pandas>=0.22.0\n Using cached pandas-1.4.1-cp310-cp310-win_amd64.whl (10.6 MB)\nCollecting py-cpuinfo>=3.3.0\n Using cached py_cpuinfo-8.0.0-py3-none-any.whl\nCollecting google-api-python-client>=1.6.7\n Downloading google_api_python_client-2.42.0-py2.py3-none-any.whl (8.3 MB)\n …
Run Code Online (Sandbox Code Playgroud) python python-wheel tensorflow automatic-license-plate-recognition sentencepiece
我正在尝试在 VS Code 的 Jupyter Notebook 中导入 ipynb 文件。但是我每次都会收到以下错误:
Error 2021-01-02 00:31:20: Export failed [Error: Importing notebooks requires Jupyter nbconvert to be installed.
at u.getExportInterpreter (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:32:546101)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async _.export (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:251215)
at async c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:428354
at async u.waitWithStatus (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:805850)
at async E.importNotebook (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:428274)
at async E.listenForErrors (c:\Users\aviparna.biswas\.vscode\extensions\ms-toolsai.jupyter-2020.12.414227025\out\client\extension.js:49:423814)]
Run Code Online (Sandbox Code Playgroud)
我还使用 pip 在 VS Code 中安装了 nbconvert,并且还重新启动了 VS Code。问题一直存在。
我正在尝试通过 pytorch_lightning 训练我的问答模型。但是,在运行命令时,trainer.fit(model,data_module)
我收到以下错误:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-72-b9cdaa88efa7> in <module>()
----> 1 trainer.fit(model,data_module)
4 frames
/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/trainer.py in _call_setup_hook(self)
1488
1489 if self.datamodule is not None:
-> 1490 self.datamodule.setup(stage=fn)
1491 self._call_callback_hooks("setup", stage=fn)
1492 self._call_lightning_module_hook("setup", stage=fn)
TypeError: setup() got an unexpected keyword argument 'stage'
Run Code Online (Sandbox Code Playgroud)
我已经安装并导入了 pytorch_lightning。
我还定义了data_module = BioQADataModule(train_df, val_df, tokenizer, batch_size = BATCH_SIZE)
其中 BATCH_SIZE = 2,N_EPOCHS = 6。
我使用的模型如下:-
model = T5ForConditionalGeneration.from_pretrained(MODEL_NAME, return_dict=True)
Run Code Online (Sandbox Code Playgroud)
另外,我为模型定义了类,如下所示:-
class BioQAModel(pl.LightningModule):
def __init__(self):
super().__init__()
self.model = T5ForConditionalGeneration.from_pretrained(MODEL_NAME, return_dict=True)
def …
Run Code Online (Sandbox Code Playgroud) 我已经安装了 CMake,现在正在尝试为人脸识别项目安装 dlib。我看过一些视频,问题似乎是兼容性问题。对于 Python 3.9.1 哪个版本的 dlib 更兼容?我尝试使用 pip 安装 dlib,手动下载它,但仍然显示以下错误:
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: c:\users\aviparna.biswas\appdata\local\programs\python\python39\Include\UNKNOWN
sysconfig: c:\users\aviparna.biswas\appdata\local\programs\python\python39\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Collecting dlib
Using cached dlib-19.22.0.tar.gz (7.4 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\aviparna.biswas\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; …
Run Code Online (Sandbox Code Playgroud) python ×2
automatic-license-plate-recognition ×1
cmake ×1
dlib ×1
nbconvert ×1
opencv ×1
python-wheel ×1
pytorch ×1
tensorflow ×1