receptive_field_analysis_toolbox
receptive_field_analysis_toolbox copied to clipboard
YOLOv7-Tiny: Is this program recognize nn.upsample??
Hi, I'm trying to test this code to my yolov7-tiny model.
I found some errors at first time, but after fixing some code, it worked!
<MyCode.py>
from rfa_toolbox import create_graph_from_pytorch_model, visualize_architecture
import torch
import argparse
import torchvision
def do(model_path):
model = torch.load(model_path, map_location=torch.device('cuda:0'))
graph = create_graph_from_pytorch_model(model['model'])
#model = torchvision.models.alexnet()
#graph = create_graph_from_pytorch_model(model)
visualize_architecture(
graph, f"Yolov7-Tiny-pixel", input_res=416
).view()
if __name__ == "__main__":
ap = argparse.ArgumentParser()
ap.add_argument('--model', required=True, help='path to weight file')
args = vars(ap.parse_args())
do(args['model'])
print('Program is terminated.\n')
<rfa_toolbox/encodings/pytorch/ingest_architecture.py>
def _obtain_variable_names(graph: torch._C.Graph) -> Dict[str, str]:
result = {}
for node in graph.nodes():
try:
x, y = str(node).split(" : ")
key, value = x, y
result[key] = value
print(result[key])
# This Part Added ======================
except:
temp = []
temp = str(node).split(", %")
for i in range(len(temp)):
if i == 0:
x, y = str(temp[i]).split(" : ")
else:
temp[i] = '%' + temp[i]
x, y = str(temp[i]).split(" : ")
result[x] = y
print(result[x])
return result
# =================================
return result
def create_graph_from_model(
model: torch.nn.Module,
filter_rf: Optional[
Union[
Callable[[Tuple[ReceptiveFieldInfo, ...]], Tuple[ReceptiveFieldInfo, ...]],
str,
]
] = None,
input_res: Tuple[int, int, int, int] = (1, 3, 399, 399),
custom_layers: Optional[List[str]] = None,
display_se_modules: bool = False,
) -> EnrichedNetworkNode:
"""Create a graph of enriched network nodes from a PyTorch-Model.
Args:
model: a PyTorch-Model.
filter_rf: a function that filters receptive field sizes.
Disabled by default.
input_res: input-tuple shape that can be processed by the model.
Needs to be a 4-Tuple of shape (batch_size,
color_channels, height, width) for CNNs.
Needs to be a 2-Tuple of shape (batch_size,
num_features) for fully connected networks.
custom_layers: Class-names of custom layers, like DropPath
or Involutions, which are not part of
torch.nn. Keep in mind that unknown layers
will defaulted to have no effect on the
receptive field size. You may need to
implement some additional layer handlers.
display_se_modules: False by default. If True, displays the structure
inside Squeeze-and-Excitation modules and considers their
maximum receptive field size infinite, which is technically
closer to the truth but irrelevant in practice.
Returns:
The EnrichedNetworkNodeGraph
"""
custom_layers = (
["ConvNormActivation"]
if custom_layers is None
else custom_layers + ["ConvNormActivation"]
)
if not display_se_modules:
custom_layers.append("SqueezeExcitation")
filter_func = (
filter_rf
if (not isinstance(filter_rf, str) and filter_rf is not None)
else KNOWN_FILTER_MAPPING[filter_rf]
)
# This Part Added ======================
inputTensor = torch.as_tensor(torch.randn(*input_res), dtype=torch.half).to('cuda:0')
tm = torch.jit.trace(model, inputTensor)
# =================================
return make_graph(
tm, filter_rf=filter_func, ref_mod=model, classes_to_not_visit=custom_layers
).to_graph()
After it worked, I looked result pdf file and recognized strange part.
After Upsample Layer, "Feature Map Res" is not changed..
Isn't it should be changed like below picture? It is tensor size of each layer.
Sorry for unclean text, I'm not used to github.
Do you have any idea to solve this issue?
My env:
Detail
name: base channels:
- conda-forge
- defaults dependencies:
- _ipyw_jlab_nb_ext_conf=0.1.0=py39h06a4308_1
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- alabaster=0.7.12=pyhd3eb1b0_0
- anaconda=2022.10=py39_0
- anaconda-client=1.11.0=py39h06a4308_0
- anaconda-navigator=2.4.0=py39h06a4308_0
- anaconda-project=0.11.1=py39h06a4308_0
- anyio=3.5.0=py39h06a4308_0
- appdirs=1.4.4=pyhd3eb1b0_0
- argon2-cffi=21.3.0=pyhd3eb1b0_0
- argon2-cffi-bindings=21.2.0=py39h7f8727e_0
- arrow=1.2.2=pyhd3eb1b0_0
- astroid=2.11.7=py39h06a4308_0
- astropy=5.1=py39h7deecbd_0
- atk-1.0=2.36.0=ha1a6a79_0
- atomicwrites=1.4.0=py_0
- attrs=21.4.0=pyhd3eb1b0_0
- automat=20.2.0=py_0
- autopep8=1.6.0=pyhd3eb1b0_1
- babel=2.9.1=pyhd3eb1b0_0
- backcall=0.2.0=pyhd3eb1b0_0
- backports=1.1=pyhd3eb1b0_0
- backports.functools_lru_cache=1.6.4=pyhd3eb1b0_0
- backports.tempfile=1.0=pyhd3eb1b0_1
- backports.weakref=1.0.post1=py_1
- bcrypt=3.2.0=py39h5eee18b_1
- beautifulsoup4=4.11.1=py39h06a4308_0
- binaryornot=0.4.4=pyhd3eb1b0_1
- bitarray=2.5.1=py39h5eee18b_0
- bkcharts=0.2=py39h06a4308_1
- black=22.6.0=py39h06a4308_0
- blas=1.0=mkl
- bleach=4.1.0=pyhd3eb1b0_0
- blosc=1.21.0=h4ff587b_1
- bokeh=2.4.3=py39h06a4308_0
- boto3=1.24.28=py39h06a4308_0
- botocore=1.27.28=py39h06a4308_0
- bottleneck=1.3.5=py39h7deecbd_0
- brotli=1.0.9=h5eee18b_7
- brotli-bin=1.0.9=h5eee18b_7
- brotlipy=0.7.0=py39h27cfd23_1003
- brunsli=0.1=h2531618_0
- bzip2=1.0.8=h7b6447c_0
- c-ares=1.18.1=h7f8727e_0
- ca-certificates=2022.07.19=h06a4308_0
- cairo=1.16.0=h19f5f5c_2
- certifi=2022.9.14=py39h06a4308_0
- cffi=1.15.1=py39h74dc2b5_0
- cfitsio=3.470=h5893167_7
- chardet=4.0.0=py39h06a4308_1003
- charls=2.2.0=h2531618_0
- charset-normalizer=2.0.4=pyhd3eb1b0_0
- click=8.0.4=py39h06a4308_0
- cloudpickle=2.0.0=pyhd3eb1b0_0
- clyent=1.2.2=py39h06a4308_1
- colorama=0.4.5=py39h06a4308_0
- colorcet=3.0.0=py39h06a4308_0
- conda=23.1.0=py39h06a4308_0
- conda-build=3.22.0=py39h06a4308_0
- conda-content-trust=0.1.3=py39h06a4308_0
- conda-env=2.6.0=1
- conda-pack=0.6.0=pyhd3eb1b0_0
- conda-package-handling=1.9.0=py39h5eee18b_0
- conda-repo-cli=1.0.20=py39h06a4308_0
- conda-token=0.4.0=pyhd3eb1b0_0
- conda-verify=3.4.2=py_1
- constantly=15.1.0=pyh2b92418_0
- cookiecutter=1.7.3=pyhd3eb1b0_0
- cryptography=37.0.1=py39h9ce1e76_0
- cssselect=1.1.0=pyhd3eb1b0_0
- curl=7.84.0=h5eee18b_0
- cycler=0.11.0=pyhd3eb1b0_0
- cython=0.29.32=py39h6a678d5_0
- cytoolz=0.11.0=py39h27cfd23_0
- daal4py=2021.6.0=py39h79cecc1_1
- dal=2021.6.0=hdb19cb5_916
- dask=2022.7.0=py39h06a4308_0
- dask-core=2022.7.0=py39h06a4308_0
- dataclasses=0.8=pyh6d0b6a4_7
- datashader=0.14.1=py39h06a4308_0
- datashape=0.5.4=py39h06a4308_1
- dbus=1.13.18=hb2f20db_0
- debugpy=1.5.1=py39h295c915_0
- decorator=5.1.1=pyhd3eb1b0_0
- defusedxml=0.7.1=pyhd3eb1b0_0
- diff-match-patch=20200713=pyhd3eb1b0_0
- dill=0.3.4=pyhd3eb1b0_0
- distributed=2022.7.0=py39h06a4308_0
- docutils=0.18.1=py39h06a4308_3
- entrypoints=0.4=py39h06a4308_0
- et_xmlfile=1.1.0=py39h06a4308_0
- expat=2.4.9=h6a678d5_0
- fftw=3.3.9=h27cfd23_1
- filelock=3.6.0=pyhd3eb1b0_0
- flake8=4.0.1=pyhd3eb1b0_1
- flask=1.1.2=pyhd3eb1b0_0
- font-ttf-dejavu-sans-mono=2.37=hd3eb1b0_0
- font-ttf-inconsolata=2.001=hcb22688_0
- font-ttf-source-code-pro=2.030=hd3eb1b0_0
- font-ttf-ubuntu=0.83=h8b1ccd4_0
- fontconfig=2.13.1=h6c09931_0
- fonts-anaconda=1=h8fa9717_0
- fonts-conda-ecosystem=1=hd3eb1b0_0
- fonttools=4.25.0=pyhd3eb1b0_0
- freetype=2.11.0=h70c0345_0
- fribidi=1.0.10=h7b6447c_0
- fsspec=2022.7.1=py39h06a4308_0
- future=0.18.2=py39h06a4308_1
- gdk-pixbuf=2.42.8=h433bba3_1
- gensim=4.1.2=py39h295c915_0
- giflib=5.2.1=h7b6447c_0
- glib=2.69.1=h4ff587b_1
- glob2=0.7=pyhd3eb1b0_0
- gmp=6.2.1=h295c915_3
- gmpy2=2.1.2=py39heeb90bb_0
- gobject-introspection=1.72.0=py39hbb6d50b_0
- graphite2=1.3.14=h295c915_1
- graphviz=2.50.0=h3cd0ef9_0
- greenlet=1.1.1=py39h295c915_0
- gst-plugins-base=1.14.0=h8213a91_2
- gstreamer=1.14.0=h28cd5cc_2
- gtk2=2.24.33=h73c1081_2
- gts=0.7.6=hb67d8dd_3
- h5py=3.7.0=py39h737f45e_0
- harfbuzz=4.3.0=hf52aaf7_1
- hdf5=1.10.6=h3ffc7dd_1
- heapdict=1.0.1=pyhd3eb1b0_0
- holoviews=1.15.0=py39h06a4308_0
- hvplot=0.8.0=py39h06a4308_0
- hyperlink=21.0.0=pyhd3eb1b0_0
- icu=58.2=he6710b0_3
- idna=3.3=pyhd3eb1b0_0
- imagecodecs=2021.8.26=py39hf0132c2_1
- imageio=2.19.3=py39h06a4308_0
- imagesize=1.4.1=py39h06a4308_0
- importlib-metadata=4.11.3=py39h06a4308_0
- importlib_metadata=4.11.3=hd3eb1b0_0
- incremental=21.3.0=pyhd3eb1b0_0
- inflection=0.5.1=py39h06a4308_0
- iniconfig=1.1.1=pyhd3eb1b0_0
- intake=0.6.5=pyhd3eb1b0_0
- intel-openmp=2021.4.0=h06a4308_3561
- intervaltree=3.1.0=pyhd3eb1b0_0
- ipykernel=6.15.2=py39h06a4308_0
- ipython=7.31.1=py39h06a4308_1
- ipython_genutils=0.2.0=pyhd3eb1b0_1
- ipywidgets=7.6.5=pyhd3eb1b0_1
- isort=5.9.3=pyhd3eb1b0_0
- itemadapter=0.3.0=pyhd3eb1b0_0
- itemloaders=1.0.4=pyhd3eb1b0_1
- itsdangerous=2.0.1=pyhd3eb1b0_0
- jdcal=1.4.1=pyhd3eb1b0_0
- jedi=0.18.1=py39h06a4308_1
- jeepney=0.7.1=pyhd3eb1b0_0
- jellyfish=0.9.0=py39h7f8727e_0
- jinja2=2.11.3=pyhd3eb1b0_0
- jinja2-time=0.2.0=pyhd3eb1b0_3
- jmespath=0.10.0=pyhd3eb1b0_0
- joblib=1.1.0=pyhd3eb1b0_0
- jpeg=9e=h7f8727e_0
- jq=1.6=h27cfd23_1000
- json5=0.9.6=pyhd3eb1b0_0
- jsonschema=4.16.0=py39h06a4308_0
- jupyter=1.0.0=py39h06a4308_8
- jupyter_client=7.3.4=py39h06a4308_0
- jupyter_console=6.4.3=pyhd3eb1b0_0
- jupyter_core=4.11.1=py39h06a4308_0
- jupyter_server=1.18.1=py39h06a4308_0
- jupyterlab=3.4.4=py39h06a4308_0
- jupyterlab_pygments=0.1.2=py_0
- jupyterlab_server=2.10.3=pyhd3eb1b0_1
- jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
- jxrlib=1.1=h7b6447c_2
- keyring=23.4.0=py39h06a4308_0
- kiwisolver=1.4.2=py39h295c915_0
- krb5=1.19.2=hac12032_0
- lazy-object-proxy=1.6.0=py39h27cfd23_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.38=h1181459_1
- lerc=3.0=h295c915_0
- libaec=1.0.4=he6710b0_1
- libarchive=3.6.1=hab531cd_0
- libbrotlicommon=1.0.9=h5eee18b_7
- libbrotlidec=1.0.9=h5eee18b_7
- libbrotlienc=1.0.9=h5eee18b_7
- libcurl=7.84.0=h91b91d3_0
- libdeflate=1.8=h7f8727e_5
- libedit=3.1.20210910=h7f8727e_0
- libev=4.33=h7f8727e_1
- libevent=2.1.12=h8f2d780_0
- libffi=3.3=he6710b0_2
- libgcc-ng=11.2.0=h1234567_1
- libgd=2.3.3=h695aa2c_1
- libgfortran-ng=11.2.0=h00389a5_1
- libgfortran5=11.2.0=h1234567_1
- libgomp=11.2.0=h1234567_1
- libidn2=2.3.2=h7f8727e_0
- liblief=0.11.5=h295c915_1
- libllvm10=10.0.1=hbcb73fb_5
- libllvm11=11.1.0=h9e868ea_5
- libnghttp2=1.46.0=hce63b2e_0
- libpng=1.6.37=hbc83047_0
- libpq=12.9=h16c4e8d_3
- librsvg=2.54.4=h19fe530_0
- libsodium=1.0.18=h7b6447c_0
- libspatialindex=1.9.3=h2531618_0
- libssh2=1.10.0=h8f2d780_0
- libstdcxx-ng=11.2.0=h1234567_1
- libtiff=4.4.0=hecacb30_0
- libtool=2.4.6=h6a678d5_1009
- libunistring=0.9.10=h27cfd23_0
- libuuid=1.0.3=h7f8727e_2
- libwebp=1.2.2=h55f646e_0
- libwebp-base=1.2.2=h7f8727e_0
- libxcb=1.15=h7f8727e_0
- libxkbcommon=1.0.1=hfa300c1_0
- libxml2=2.9.14=h74e7548_0
- libxslt=1.1.35=h4e12654_0
- libzopfli=1.0.3=he6710b0_0
- llvmlite=0.38.0=py39h4ff587b_0
- locket=1.0.0=py39h06a4308_0
- lxml=4.9.1=py39h1edc446_0
- lz4=3.1.3=py39h27cfd23_0
- lz4-c=1.9.3=h295c915_1
- lzo=2.10=h7b6447c_2
- markdown=3.3.4=py39h06a4308_0
- markupsafe=2.0.1=py39h27cfd23_0
- matplotlib=3.5.2=py39h06a4308_0
- matplotlib-base=3.5.2=py39hf590b9c_0
- matplotlib-inline=0.1.6=py39h06a4308_0
- mccabe=0.7.0=pyhd3eb1b0_0
- mistune=0.8.4=py39h27cfd23_1000
- mkl=2021.4.0=h06a4308_640
- mkl-service=2.4.0=py39h7f8727e_0
- mkl_fft=1.3.1=py39hd3c417c_0
- mkl_random=1.2.2=py39h51133e4_0
- mock=4.0.3=pyhd3eb1b0_0
- mpc=1.1.0=h10f8cd9_1
- mpfr=4.0.2=hb69a4c5_1
- mpi=1.0=mpich
- mpich=3.3.2=external_0
- mpmath=1.2.1=py39h06a4308_0
- msgpack-python=1.0.3=py39hd09550d_0
- multipledispatch=0.6.0=py39h06a4308_0
- munkres=1.1.4=py_0
- mypy_extensions=0.4.3=py39h06a4308_1
- navigator-updater=0.3.0=py39h06a4308_0
- nbclassic=0.3.5=pyhd3eb1b0_0
- nbclient=0.5.13=py39h06a4308_0
- nbconvert=6.4.4=py39h06a4308_0
- nbformat=5.5.0=py39h06a4308_0
- ncurses=6.3=h5eee18b_3
- nest-asyncio=1.5.5=py39h06a4308_0
- networkx=2.8.4=py39h06a4308_0
- ninja=1.10.2=h06a4308_5
- ninja-base=1.10.2=hd09550d_5
- nltk=3.7=pyhd3eb1b0_0
- nose=1.3.7=pyhd3eb1b0_1008
- notebook=6.4.12=py39h06a4308_0
- nspr=4.33=h295c915_0
- nss=3.74=h0370c37_0
- numba=0.55.1=py39h51133e4_0
- numexpr=2.8.3=py39h807cd23_0
- numpy=1.21.5=py39h6c91a56_3
- numpy-base=1.21.5=py39ha15fc14_3
- numpydoc=1.4.0=py39h06a4308_0
- olefile=0.46=pyhd3eb1b0_0
- oniguruma=6.9.7.1=h27cfd23_0
- openjpeg=2.4.0=h3ad879b_0
- openpyxl=3.0.10=py39h5eee18b_0
- openssl=1.1.1q=h7f8727e_0
- packaging=21.3=pyhd3eb1b0_0
- pandas=1.4.4=py39h6a678d5_0
- pandocfilters=1.5.0=pyhd3eb1b0_0
- panel=0.13.1=py39h06a4308_0
- pango=1.50.7=h05da053_0
- param=1.12.0=pyhd3eb1b0_0
- parsel=1.6.0=py39h06a4308_0
- parso=0.8.3=pyhd3eb1b0_0
- partd=1.2.0=pyhd3eb1b0_1
- patch=2.7.6=h7b6447c_1001
- patchelf=0.13=h295c915_0
- pathlib=1.0.1=pyhd3eb1b0_1
- pathspec=0.9.0=py39h06a4308_0
- patsy=0.5.2=py39h06a4308_1
- pcre=8.45=h295c915_0
- pep8=1.7.1=py39h06a4308_1
- pexpect=4.8.0=pyhd3eb1b0_3
- pickleshare=0.7.5=pyhd3eb1b0_1003
- pillow=9.2.0=py39hace64e9_1
- pip=22.2.2=py39h06a4308_0
- pixman=0.40.0=h7f8727e_1
- pkginfo=1.8.2=pyhd3eb1b0_0
- platformdirs=2.5.2=py39h06a4308_0
- plotly=5.9.0=py39h06a4308_0
- pluggy=1.0.0=py39h06a4308_1
- ply=3.11=py39h06a4308_0
- poyo=0.5.0=pyhd3eb1b0_0
- prometheus_client=0.14.1=py39h06a4308_0
- prompt-toolkit=3.0.20=pyhd3eb1b0_0
- prompt_toolkit=3.0.20=hd3eb1b0_0
- protego=0.1.16=py_0
- psutil=5.9.0=py39h5eee18b_0
- ptyprocess=0.7.0=pyhd3eb1b0_2
- py=1.11.0=pyhd3eb1b0_0
- py-lief=0.11.5=py39h295c915_1
- pyasn1=0.4.8=pyhd3eb1b0_0
- pyasn1-modules=0.2.8=py_0
- pycodestyle=2.8.0=pyhd3eb1b0_0
- pycosat=0.6.3=py39h27cfd23_0
- pycparser=2.21=pyhd3eb1b0_0
- pyct=0.4.8=py39h06a4308_1
- pycurl=7.45.1=py39h8f2d780_0
- pydispatcher=2.0.5=py39h06a4308_2
- pydocstyle=6.1.1=pyhd3eb1b0_0
- pyerfa=2.0.0=py39h27cfd23_0
- pyflakes=2.4.0=pyhd3eb1b0_0
- pygments=2.11.2=pyhd3eb1b0_0
- pyhamcrest=2.0.2=pyhd3eb1b0_2
- pyjwt=2.4.0=py39h06a4308_0
- pylint=2.14.5=py39h06a4308_0
- pyls-spyder=0.4.0=pyhd3eb1b0_0
- pyodbc=4.0.34=py39h6a678d5_0
- pyopenssl=22.0.0=pyhd3eb1b0_0
- pyparsing=3.0.9=py39h06a4308_0
- pyqt=5.15.7=py39h6a678d5_1
- pyqt5-sip=12.11.0=py39h6a678d5_1
- pyqtwebengine=5.15.7=py39h6a678d5_1
- pyrsistent=0.18.0=py39heee7806_0
- pysocks=1.7.1=py39h06a4308_0
- pytables=3.6.1=py39h77479fe_1
- pytest=7.1.2=py39h06a4308_0
- python=3.9.13=haa1d7c7_1
- python-dateutil=2.8.2=pyhd3eb1b0_0
- python-fastjsonschema=2.16.2=py39h06a4308_0
- python-graphviz=0.20.1=py39h06a4308_0
- python-libarchive-c=2.9=pyhd3eb1b0_1
- python-lsp-black=1.2.1=py39h06a4308_0
- python-lsp-jsonrpc=1.0.0=pyhd3eb1b0_0
- python-lsp-server=1.5.0=py39h06a4308_0
- python-slugify=5.0.2=pyhd3eb1b0_0
- python-snappy=0.6.0=py39h2531618_3
- python_abi=3.9=2_cp39
- pytz=2022.1=py39h06a4308_0
- pyviz_comms=2.0.2=pyhd3eb1b0_0
- pywavelets=1.3.0=py39h7f8727e_0
- pyxdg=0.27=pyhd3eb1b0_0
- pyyaml=6.0=py39h7f8727e_1
- pyzmq=23.2.0=py39h6a678d5_0
- qdarkstyle=3.0.2=pyhd3eb1b0_0
- qstylizer=0.1.10=pyhd3eb1b0_0
- qt=5.15.9=h06a4308_0
- qt-main=5.15.2=h327a75a_7
- qt-webengine=5.15.9=hd2b0992_4
- qtawesome=1.0.3=pyhd3eb1b0_0
- qtconsole=5.3.2=py39h06a4308_0
- qtpy=2.2.0=py39h06a4308_0
- qtwebkit=5.212=h4eab89a_4
- queuelib=1.5.0=py39h06a4308_0
- readline=8.1.2=h7f8727e_1
- regex=2022.7.9=py39h5eee18b_0
- requests=2.28.1=py39h06a4308_0
- requests-file=1.5.1=pyhd3eb1b0_0
- ripgrep=13.0.0=hbdeaff8_0
- rope=0.22.0=pyhd3eb1b0_0
- rtree=0.9.7=py39h06a4308_1
- ruamel.yaml=0.17.21=py39hb9d737c_1
- ruamel.yaml.clib=0.2.6=py39h5eee18b_1
- ruamel_yaml=0.15.100=py39h27cfd23_0
- s3transfer=0.6.0=py39h06a4308_0
- scikit-image=0.19.2=py39h51133e4_0
- scikit-learn=1.0.2=py39h51133e4_1
- scikit-learn-intelex=2021.6.0=py39h06a4308_0
- scipy=1.9.1=py39h14f4228_0
- scrapy=2.6.2=py39h06a4308_0
- seaborn=0.11.2=pyhd3eb1b0_0
- secretstorage=3.3.1=py39h06a4308_0
- send2trash=1.8.0=pyhd3eb1b0_1
- service_identity=18.1.0=pyhd3eb1b0_1
- setuptools=63.4.1=py39h06a4308_0
- sip=6.6.2=py39h6a678d5_0
- six=1.16.0=pyhd3eb1b0_1
- smart_open=5.2.1=py39h06a4308_0
- snappy=1.1.9=h295c915_0
- sniffio=1.2.0=py39h06a4308_1
- snowballstemmer=2.2.0=pyhd3eb1b0_0
- sortedcollections=2.1.0=pyhd3eb1b0_0
- sortedcontainers=2.4.0=pyhd3eb1b0_0
- soupsieve=2.3.1=pyhd3eb1b0_0
- sphinx=5.0.2=py39h06a4308_0
- sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0
- sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0
- sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0
- sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0
- sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0
- sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0
- spyder=5.3.3=py39h06a4308_0
- spyder-kernels=2.3.3=py39h06a4308_0
- sqlalchemy=1.4.39=py39h5eee18b_0
- sqlite=3.39.3=h5082296_0
- statsmodels=0.13.2=py39h7f8727e_0
- sympy=1.10.1=py39h06a4308_0
- tabulate=0.8.10=py39h06a4308_0
- tbb=2021.6.0=hdb19cb5_0
- tbb4py=2021.6.0=py39hdb19cb5_0
- tblib=1.7.0=pyhd3eb1b0_0
- tenacity=8.0.1=py39h06a4308_1
- terminado=0.13.1=py39h06a4308_0
- testpath=0.6.0=py39h06a4308_0
- text-unidecode=1.3=pyhd3eb1b0_0
- textdistance=4.2.1=pyhd3eb1b0_0
- threadpoolctl=2.2.0=pyh0d69192_0
- three-merge=0.1.1=pyhd3eb1b0_0
- tifffile=2021.7.2=pyhd3eb1b0_2
- tinycss=0.4=pyhd3eb1b0_1002
- tk=8.6.12=h1ccaba5_0
- tldextract=3.2.0=pyhd3eb1b0_0
- toml=0.10.2=pyhd3eb1b0_0
- tomli=2.0.1=py39h06a4308_0
- tomlkit=0.11.1=py39h06a4308_0
- toolz=0.11.2=pyhd3eb1b0_0
- tornado=6.1=py39h27cfd23_0
- tqdm=4.64.1=py39h06a4308_0
- traitlets=5.1.1=pyhd3eb1b0_0
- twisted=22.2.0=py39h5eee18b_1
- typing-extensions=4.3.0=py39h06a4308_0
- typing_extensions=4.3.0=py39h06a4308_0
- tzdata=2022c=h04d1e81_0
- ujson=5.4.0=py39h6a678d5_0
- unidecode=1.2.0=pyhd3eb1b0_0
- unixodbc=2.3.11=h5eee18b_0
- urllib3=1.26.11=py39h06a4308_0
- w3lib=1.21.0=pyhd3eb1b0_0
- watchdog=2.1.6=py39h06a4308_0
- wcwidth=0.2.5=pyhd3eb1b0_0
- webencodings=0.5.1=py39h06a4308_1
- websocket-client=0.58.0=py39h06a4308_4
- werkzeug=2.0.3=pyhd3eb1b0_0
- wget=1.21.3=h0b77cf5_0
- whatthepatch=1.0.2=py39h06a4308_0
- wheel=0.37.1=pyhd3eb1b0_0
- widgetsnbextension=3.5.2=py39h06a4308_0
- wrapt=1.14.1=py39h5eee18b_0
- wurlitzer=3.0.2=py39h06a4308_0
- xarray=0.20.1=pyhd3eb1b0_1
- xlrd=2.0.1=pyhd3eb1b0_0
- xlsxwriter=3.0.3=pyhd3eb1b0_0
- xz=5.2.6=h5eee18b_0
- yaml=0.2.5=h7b6447c_0
- yapf=0.31.0=pyhd3eb1b0_0
- zeromq=4.3.4=h2531618_0
- zfp=0.5.5=h295c915_6
- zict=2.1.0=py39h06a4308_0
- zipp=3.8.0=py39h06a4308_0
- zlib=1.2.12=h5eee18b_3
- zope=1.0=py39h06a4308_1
- zope.interface=5.4.0=py39h7f8727e_0
- zstd=1.5.2=ha4553b6_0
- pip:
- absl-py==1.4.0
- addict==2.4.0
- astunparse==1.6.3
- cachetools==5.2.1
- cupy-cuda11x==11.4.0
- docker-pycreds==0.4.0
- fastrlock==0.8.1
- flatbuffers==23.1.4
- gast==0.4.0
- gitdb==4.0.10
- gitpython==3.1.30
- google-auth==2.16.0
- google-auth-oauthlib==0.4.6
- google-pasta==0.2.0
- grpcio==1.51.1
- keras==2.11.0
- libclang==15.0.6.1
- mmcv==1.7.1
- nvidia-cublas-cu11==11.10.3.66
- nvidia-cuda-nvrtc-cu11==11.7.99
- nvidia-cuda-runtime-cu11==11.7.99
- nvidia-cudnn-cu11==8.5.0.96
- oauthlib==3.2.2
- opencv-python==4.7.0.68
- opt-einsum==3.3.0
- pathtools==0.1.2
- protobuf==3.19.6
- pytorch-model-summary==0.1.2
- requests-oauthlib==1.3.1
- rfa-toolbox==1.7.0
- rsa==4.9
- sentry-sdk==1.13.0
- setproctitle==1.3.2
- smmap==5.0.0
- template==0.7.6
- tensorboard==2.11.2
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- tensorflow==2.11.0
- tensorflow-estimator==2.11.0
- tensorflow-io-gcs-filesystem==0.29.0
- tensorrt==8.5.2.2
- termcolor==2.2.0
- thop==0.1.1-2209072238
- torch==1.13.1
- torchsummary==1.5.1
- torchvision==0.14.1
- typing==3.7.4.3
- wandb==0.13.9 prefix: /home/dobby/anaconda3
Hi. Thank you for reaching out, and thank you for your patience. The feature map resolution is not directly read from the tracing tensor and therefore does not change correctly, upsampling in general is currently not adequately accounted for in the current setup of RFA.
Regarding the remaining code: First, thank you for sharing your changes. This contribution looks valuable to the codebase. I would like to integrate these changes in the next couple of weeks, and test it to see if it breaks other assumptions when ingesting the architecture. Alternatively, you can open a pull request with these changes and I will review it.