Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to replace feature extraction network? #33

Closed
284513016 opened this issue May 3, 2019 · 8 comments
Closed

How to replace feature extraction network? #33

284513016 opened this issue May 3, 2019 · 8 comments

Comments

@284513016
Copy link

Hello, I would like to quote your RecurrentCriss-CrossAttention separately, but the main framework has CNN feature extraction, so the CNN feature extraction and segmentation module is no longer needed, but I do not know how to get independent RecurrentCriss-CrossAttention code, I hope to get your guidance.Thank you very much

@speedinghzl
Copy link
Owner

The independent RCCA code? The RCCA class is defined here.

@284513016
Copy link
Author

Thank you very much for your reply
For the complete ccnet, I do not want CNN feature extraction and the last segmention two modules, what should I do?Can we reduce cc and rcca?That is, the part from X to H "in ccnet paper

@speedinghzl
Copy link
Owner

Yes,you can modify the RCCA module and remove the segmentation layers.

@284513016
Copy link
Author

Build.py file can not be compiled under the windows system how to solve?

@284513016
Copy link
Author

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolk it\CUDA\v9.0/lib/x64" /LIBPATH:I:\Python3.6\lib\site-packages\torch\utils\ffi....\lib /LIBPATH:I:\Python3.6\libs /LIBPATH:I:\Python3.6\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual St udio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit___ext .\Release_ext.obj .\Release\WangZhangDong\siamfc-pytorch clean_ccattention\libs\src\lib_cffi.obj H:\WangZhangDong\siamfc-pytorch_clean_ccattention\libs\src/bn.o /OUT:.__ext.pyd /IMPLIB:.\Release__ext.lib bn.o : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in lib_cffi.obj __ext.obj : warning LNK4197: export 'PyInit___ext' specified multiple times; using first specification Creating library .\Release__ext.lib and object .\Release__ext.exp LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library lib_cffi.obj : error LNK2001: unresolved external symbol __imp_THCState_getCurrentStream lib_cffi.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_data lib_cffi.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_nDimension lib_cffi.obj : error LNK2001: unresolved external symbol "struct THCState * state" (?state@@3PEAUTHCState@@ea) lib_cffi.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_nElement lib_cffi.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_size bn.o : error LNK2001: unresolved external symbol cudaDeviceGetAttribute bn.o : error LNK2001: unresolved external symbol cudaGetLastError bn.o : error LNK2001: unresolved external symbol cudaPeekAtLastError bn.o : error LNK2001: unresolved external symbol cudaGetErrorString bn.o : error LNK2001: unresolved external symbol cudaGetDevice bn.o : error LNK2001: unresolved external symbol cudaFuncGetAttributes bn.o : error LNK2001: unresolved external symbol cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags bn.o : error LNK2001: unresolved external symbol cudaStreamSynchronize bn.o : error LNK2001: unresolved external symbol cudaConfigureCall bn.o : error LNK2001: unresolved external symbol cudaSetupArgument bn.o : error LNK2001: unresolved external symbol cudaLaunch bn.o : error LNK2001: unresolved external symbol __cudaRegisterFatBinary bn.o : error LNK2001: unresolved external symbol __cudaUnregisterFatBinary bn.o : error LNK2001: unresolved external symbol __cudaRegisterVar bn.o : error LNK2001: unresolved external symbol __cudaRegisterFunction .__ext.pyd : fatal error LNK1120: 21 unresolved externals Traceback (most recent call last): File "I:\Python3.6\lib\distutils_msvccompiler.py", line 519, in link self.spawn([self.linker] + ld_args) File "I:\Python3.6\lib\distutils_msvccompiler.py", line 542, in spawn return super().spawn(cmd) File "I:\Python3.6\lib\distutils\ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "I:\Python3.6\lib\distutils\spawn.py", line 38, in spawn _spawn_nt(cmd, search_path, dry_run=dry_run) File "I:\Python3.6\lib\distutils\spawn.py", line 81, in _spawn_nt "command %r failed with exit status %d" % (cmd, rc)) distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "I:\Python3.6\lib\site-packages\cffi\ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "I:\Python3.6\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "I:\Python3.6\lib\site-packages\setuptools\command\build_ext.py", line 78, in run _build_ext.run(self) File "I:\Python3.6\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "I:\Python3.6\lib\distutils\command\build_ext.py", line 339, in run self.build_extensions() File "I:\Python3.6\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions self.build_extension(ext) File "I:\Python3.6\lib\site-packages\setuptools\command\build_ext.py", line 199, in build_extension build_ext.build_extension(self, ext) File "I:\Python3.6\lib\distutils\command\build_ext.py", line 558, in build_extension target_lang=language) File "I:\Python3.6\lib\distutils\ccompiler.py", line 717, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "I:\Python3.6\lib\distutils_msvccompiler.py", line 522, in link raise LinkError(msg) distutils.errors.LinkError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "build.py", line 24, in ffi.build() File "I:\Python3.6\lib\site-packages\torch\utils\ffi_init.py", line 189, in build build_extension(ffi, cffi_wrapper_name, target_dir, verbose) File "I:\Python3.6\lib\site-packages\torch\utils\ffi_init.py", line 111, in _build_extension outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname) File "I:\Python3.6\lib\site-packages\cffi\api.py", line 723, in compile compiler_verbose=verbose, debug=debug, **kwds) File "I:\Python3.6\lib\site-packages\cffi\recompiler.py", line 1526, in recompile compiler_verbose, debug) File "I:\Python3.6\lib\site-packages\cffi\ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "I:\Python3.6\lib\site-packages\cffi\ffiplatform.py", line 58, in _build raise VerificationError('%s: %s' % (e.class.name, e)) cffi.VerificationError: LinkError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

@speedinghzl
Copy link
Owner

This repo doesn't support Windows system.

@284513016
Copy link
Author

What are the functions of the following modules in CC?
Bottleneck(nn.Module)
class PSPModule(nn.Module)
def _make_layer(self, block, planes, blocks, stride=1, dilation=1, multi_grid=1)
Do you want to extract rcca module above?

@speedinghzl
Copy link
Owner

I don't know exactly what you mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants