
视觉问答项目实战
snow5618
梦在远方,路在脚下,初心不忘,方可抵达。
展开
-
python读取json文件报错
在跑目标检测任务时,python读取annotation里instance_train2014报如下错:ValueError: Unterminated string starting at: line 1 column 18194403 (char 18194402)ValueError: Expecting object: line 1 column 49012736 (char 49012735)ValueError: Expecting object: line 1 column 11.原创 2022-02-28 11:25:09 · 2656 阅读 · 0 评论 -
RuntimeError: CUDA out of memory. Tried to allocate 22.00 MiB (GPU 0; 10.76 GiB total capacity; 9.61
RuntimeError: CUDA out of memory. Tried to allocate 22.00 MiB (GPU 0; 10.76 GiB total capacity; 9.61 GiB already allocated; 4.50 MiB free; 332.12 MiB cached)有时遇到这种情况,怎么改batchsize都还是会报内存溢出错误,nVidia-smi时发现gpu很多空闲,这时出现的原因极可能就是中间变量数据导致的,这时可以检查loss,acc,pred等中间原创 2021-04-04 13:30:29 · 3348 阅读 · 1 评论 -
关于pytorch复现模型的一些报错总结
1.RuntimeError: One of the differentiated Tensors does not require grad关于这个报错的意思是:有一个参数不需要计算导数此torch.autograd.grad函数参数如下:outputs,inputs,函数功能是求outputs关于inputs的导数,此处的inputs需要加requires_grad_()定义:v = Variable(v).to(device).requires_grad_()2. RuntimeError:原创 2021-03-17 20:13:44 · 6907 阅读 · 0 评论 -
【结果分析】之murel项目结果分析
1.murel:视觉问答VQA中的多模态关系推理项目介绍本次结果是第20个epoch,采用的是验证集的results文件,由于中途断了,导致没有执行测试集test.2.结果分析我们评估采用的使官网提供的eval,2.1 结果Overall Accuracy is: 64.50Per Question Type Accuracy is the following:none of the above : 58.44what are the : 50.41what is : 43.08原创 2020-11-23 18:09:19 · 394 阅读 · 0 评论 -
VQA-ReGat 项目运行遇到的错误
VQA-ReGat:关系感知图形注意网络用于VQA项目地址论文地址1.torch报错:StopIteration: Caught StopIteration in replica 0 on device 0.原因:多GPU运行此项目报错,可能是torch版本错误。修改:按照别的博客将 weight = next(self.parameters()).data改为weight = torch.float322.仍报错:AttributeError: 'torch.dtype' no att原创 2020-11-21 10:34:56 · 3962 阅读 · 19 评论 -
【结果分析】之block项目
blockvqa项目介绍1.vqaEval# This code is based on the code written by Tsung-Yi Lin for MSCOCO Python API available at the following link: # (https://github.com/tylin/coco-caption/blob/master/pycocoevalcap/eval.py).import sysimport reclass VQAEval: de原创 2020-11-23 16:57:25 · 557 阅读 · 0 评论 -
【数据处理】之读取hdf5文件
hdf5文件HDF5是一种常见的跨平台数据存储文件,可以存储不同类型的图像和数码数据,并且可以在不同类型的机器上传输,同时还有统一处理这种格式的函数库HDF5文件一般以.h5和.hdf5作为后缀名,hdf5文件结构中有2个主要对象:Groups和Datasets,Groups:类似于文件夹,每个hdf5文件其实就是根目录groupDatasets:类似于Numpy中的数组hdf5读取参考#!/usr/bin/python# -*- coding: UTF-8 -*-## Create原创 2020-11-14 17:43:24 · 6431 阅读 · 1 评论 -
VQA-object_counting代码项目分析
0. 写在前面本文主要介绍《LEARNING TO COUNT OBJECTS IN NATURAL IMAGES FOR VISUAL QUESTION ANSWERING》的代码项目,也就是别人的代码加上自己的注释。。。博客地址:https://blog.youkuaiyun.com/snow_maple521/article/details/109190431论文地址:https://github.com/Cyanogenoid/vqa-counting项目地址:https://openreview.n原创 2020-11-12 11:16:20 · 1160 阅读 · 3 评论