gpt4 book ai didi

python - 使用 TensorFlow 从 Google Drive 下载时出现 HTTP 错误

转载 作者:行者123 更新时间:2023-11-30 09:14:13 26 4
gpt4 key购买 nike

我一直在尝试训练神经网络来处理动画图像,经过大约两个阶段的训练后,TensorFlow 尝试从 Google 驱动器下载某种文件,然后立即失败并停止训练。我不确定它是否创建谷歌驱动器文件本身,因为链接每次都不同,或者是否发生了其他事情。我能否获得一些帮助来阅读错误的字里行间,并可能了解问题可能是什么?我对这种类型的编程非常陌生,以前从未使用过 TensorFlow 或 StyleGAN。我已经使用不同分辨率的图像多次运行该程序,但它总是在同一部分失败。

日志文件:

---                  ---       ---                 ---              Total                22941313                                      

Building TensorFlow graph... Setting up snapshot image grid... Setting up run dir... Training...

tick 1 kimg 140.3 lod 4.00 minibatch 128 time 11m 48s sec/tick 661.6 sec/kimg 4.72 maintenance 46.3 gpumem 3.1 Downloading https://drive.google.com/uc?id=1MzTY44rLToO5APn8TZmfR7_ENSe5aZUn ............ failed Traceback (most recent call last): File "train.py", line 191, in <module>
main() File "train.py", line 186, in main
dnnlib.submit_run(**kwargs) File "D:\Personal\Neural Net\stylegan-master\dnnlib\submission\submit.py", line 290, in submit_run
run_wrapper(submit_config) File "D:\Personal\Neural Net\stylegan-master\dnnlib\submission\submit.py", line 242, in run_wrapper
util.call_func_by_name(func_name=submit_config.run_func_name, submit_config=submit_config, **submit_config.run_func_kwargs) File "D:\Personal\Neural Net\stylegan-master\dnnlib\util.py", line 257, in call_func_by_name
return func_obj(*args, **kwargs) File "D:\Personal\Neural Net\stylegan-master\training\training_loop.py", line 264, in training_loop
metrics.run(pkl, run_dir=submit_config.run_dir, num_gpus=submit_config.num_gpus, tf_config=tf_config) File "D:\Personal\Neural Net\stylegan-master\metrics\metric_base.py", line 125, in run
metric.run(*args, **kwargs) File "D:\Personal\Neural Net\stylegan-master\metrics\metric_base.py", line 60, in run
self._evaluate(Gs, num_gpus=num_gpus) File "D:\Personal\Neural Net\stylegan-master\metrics\frechet_inception_distance.py", line 29, in _evaluate
inception = misc.load_pkl('https://drive.google.com/uc?id=1MzTY44rLToO5APn8TZmfR7_ENSe5aZUn')
# inception_v3_features.pkl File "D:\Personal\Neural Net\stylegan-master\training\misc.py", line 32, in load_pkl
with open_file_or_url(file_or_url) as file: File "D:\Personal\Neural Net\stylegan-master\training\misc.py", line 28, in open_file_or_url
return dnnlib.util.open_url(file_or_url, cache_dir=config.cache_dir) File "D:\Personal\Neural Net\stylegan-master\dnnlib\util.py", line 366, in open_url
res.raise_for_status() File "D:\Users\bas11\Miniconda3\envs\tfgpu-old\lib\site-packages\requests\models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://doc-08-10-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/8fm1944ik1stbbau4d65a96qqe56ta94/1576202400000/06831416635760916404/*/1MzTY44rLToO5APn8TZmfR7_ENSe5aZUn

最佳答案

有两个可能的问题可能导致此问题:

  1. 确认您的用户名和密码对于您尝试执行的操作(写入、读取等)有效。
  2. 尝试从 Google 服务启用 APIS。有时,这些服务和批准会因政策而变化。有关 APIS 的更多信息,请访问 Enable and disable APIs

关于python - 使用 TensorFlow 从 Google Drive 下载时出现 HTTP 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59316054/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com