File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/google/protobuf/internal/containers.py", line 70, in __getitem__     return self._values[key] TypeError: list indices must be integers or slices, not str
@monajalal Please make sure that the key variable is an integer or a slice before passing it to `__getitem__` and try with the latest stable TF version 2.15. Please let us know the outcome?
Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62503">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62503">No</a>

### Issue type

Bug

Please note I saw this related issue but there was no response to it https://github.com/tensorflow/tensorflow/issues/32694

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

nvidia-tensorflow==1.15.4+nv20.12

### Custom code

Yes

### OS platform and distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

Python 3.8.18 (default, Sep 11 2023, 13:40:15) 

### Bazel version

_No response_

### GCC/compiler version

GCC 11.2.0

### CUDA/cuDNN version

check below

### GPU model and memory

ADA RTX 6000

### Current behavior?

(EfficientPose) mona@ada:~/EfficientPose$ python evaluate.py --phi 0 --weights weights/Weights/Linemod/object_8/phi_0_linemod_best_ADD.h5  --validation-image-save-path val_imgs linemod data/Linemod_preprocessed/ --object-id 8
2023-11-29 13:29:34.439724: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
WARNING:tensorflow:From evaluate.py:132: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From evaluate.py:134: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2023-11-29 13:29:35.373875: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3096000000 Hz
2023-11-29 13:29:35.376509: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2d38cf0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2023-11-29 13:29:35.376534: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2023-11-29 13:29:35.378180: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2023-11-29 13:29:35.428770: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2635d90 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2023-11-29 13:29:35.428838: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): NVIDIA RTX 6000 Ada Generation, Compute Capability 8.9
2023-11-29 13:29:35.429576: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1665] Found device 0 with properties: 
name: NVIDIA RTX 6000 Ada Generation major: 8 minor: 9 memoryClockRate(GHz): 2.505
pciBusID: 0000:52:00.0
2023-11-29 13:29:35.429626: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2023-11-29 13:29:35.451229: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2023-11-29 13:29:35.454294: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2023-11-29 13:29:35.454582: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2023-11-29 13:29:35.455238: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.11
2023-11-29 13:29:35.456550: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2023-11-29 13:29:35.456820: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2023-11-29 13:29:35.457185: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1793] Adding visible gpu devices: 0
2023-11-29 13:29:35.457221: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2023-11-29 13:29:35.461017: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1206] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-11-29 13:29:35.461038: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212]      0 
2023-11-29 13:29:35.461047: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1225] 0:   N 
2023-11-29 13:29:35.461327: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1351] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 39328 MB memory) -> physical GPU (device: 0, name: NVIDIA RTX 6000 Ada Generation, pci bus id: 0000:52:00.0, compute capability: 8.9)
{'dataset_type': 'linemod', 'rotation_representation': 'axis_angle', 'weights': 'weights/Weights/Linemod/object_8/phi_0_linemod_best_ADD.h5', 'batch_size': 1, 'phi': 0, 'gpu': None, 'score_threshold': 0.5, 'validation_image_save_path': 'val_imgs', 'linemod_path': 'data/Linemod_preprocessed/', 'object_id': 8}

Creating the Generators...
Done!

Building the Model...
Traceback (most recent call last):
  File "evaluate.py", line 368, in <module>
    main()
  File "evaluate.py", line 111, in main
    _, prediction_model, _ = build_EfficientPose(args.phi,
  File "/home/mona/EfficientPose/model.py", line 99, in build_EfficientPose
    image_input = layers.Input(input_shape)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/keras/engine/input_layer.py", line 265, in Input
    input_layer = InputLayer(**input_layer_config)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/keras/engine/input_layer.py", line 121, in __init__
    input_tensor = backend.placeholder(
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/keras/backend.py", line 1051, in placeholder
    x = array_ops.placeholder(dtype, shape=shape, name=name)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/ops/array_ops.py", line 2619, in placeholder
    return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/ops/gen_array_ops.py", line 6668, in placeholder
    _, _, _op = _op_def_lib._apply_op_helper(
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/framework/op_def_library.py", line 792, in _apply_op_helper
    op = g.create_op(op_type_name, inputs, dtypes=None, name=scope,
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/util/deprecation.py", line 513, in new_func
    return func(*args, **kwargs)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/framework/ops.py", line 3356, in create_op
    return self._create_op_internal(op_type, inputs, dtypes, input_types, name,
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/framework/ops.py", line 3411, in _create_op_internal
    node_def = _NodeDef(op_type, name, device=None, attrs=attrs)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/tensorflow_core/python/framework/ops.py", line 1552, in _NodeDef
    node_def.attr[k].CopyFrom(v)
  File "/home/mona/anaconda3/envs/EfficientPose/lib/python3.8/site-packages/google/protobuf/internal/containers.py", line 70, in __getitem__
    return self._values[key]
TypeError: list indices must be integers or slices, not str


### Standalone code to reproduce the issue

```shell
EfficientPose Repo

also here is my environment.yml for conda env

(EfficientPose) mona@ada:~/EfficientPose$ cat environment.yml 
name: EfficientPose
channels:
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2023.08.22=h06a4308_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libffi=3.4.4=h6a678d5_0
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.12=h7f8727e_0
  - pip=23.3.1=py38h06a4308_0
  - python=3.8.18=h955ad1f_0
  - pyyaml=6.0.1=py38h5eee18b_0
  - readline=8.2=h5eee18b_0
  - setuptools=68.0.0=py38h06a4308_0
  - sqlite=3.41.2=h5eee18b_0
  - tk=8.6.12=h1ccaba5_0
  - wheel=0.41.2=py38h06a4308_0
  - xz=5.4.2=h5eee18b_0
  - yaml=0.2.5=h7b6447c_0
  - zlib=1.2.13=h5eee18b_0
  - pip:
      - absl-py==2.0.0
      - astor==0.8.1
      - contourpy==1.1.1
      - cycler==0.12.1
      - cython==3.0.6
      - fonttools==4.45.1
      - gast==0.2.2
      - google-pasta==0.2.0
      - grpcio==1.59.3
      - h5py==3.10.0
      - imageio==2.33.0
      - imgaug==0.4.0
      - importlib-metadata==6.8.0
      - importlib-resources==6.1.1
      - keras-applications==1.0.8
      - keras-preprocessing==1.1.2
      - kiwisolver==1.4.5
      - lazy-loader==0.3
      - markdown==3.5.1
      - markupsafe==2.1.3
      - matplotlib==3.7.4
      - networkx==3.1
      - numpy==1.24.4
      - nvidia-cublas==11.3.0.106
      - nvidia-cuda-cupti==11.1.105
      - nvidia-cuda-nvcc==11.1.105
      - nvidia-cuda-nvrtc==11.1.105
      - nvidia-cuda-runtime==11.1.74
      - nvidia-cudnn==8.0.5.43
      - nvidia-cufft==10.3.0.105
      - nvidia-curand==10.2.2.105
      - nvidia-cusolver==11.0.1.105
      - nvidia-cusparse==11.3.0.10
      - nvidia-dali-cuda110==0.28.0
      - nvidia-dali-nvtf-plugin==0.28.0+nv20.12
      - nvidia-nccl==2.8.3
      - nvidia-pyindex==1.0.9
      - nvidia-tensorboard==1.15.0+nv20.12
      - nvidia-tensorflow==1.15.4+nv20.12
      - nvidia-tensorrt==7.2.2.1
      - opencv-python==4.8.1.78
      - opt-einsum==3.3.0
      - packaging==23.2
      - pillow==10.1.0
      - plyfile==1.0.2
      - protobuf==4.25.1
      - pyparsing==3.1.1
      - python-dateutil==2.8.2
      - pywavelets==1.4.1
      - scikit-image==0.21.0
      - scipy==1.10.1
      - shapely==2.0.2
      - six==1.16.0
      - tensorboard==1.15.0
      - tensorflow-estimator==1.15.1
      - termcolor==2.3.0
      - tifffile==2023.7.10
      - typeguard==4.1.5
      - typing-extensions==4.8.0
      - webencodings==0.5.1
      - werkzeug==3.0.1
      - wrapt==1.16.0
      - zipp==3.17.0
prefix: /home/mona/anaconda3/envs/EfficientPose
```


### Relevant log output

```shell
(base) mona@ada:~$ lsb_release -a
LSB Version:	core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy
(base) mona@ada:~$ uname -a
Linux ada 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov  2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
(base) mona@ada:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
(base) mona@ada:~$ nvidia-smi
Wed Nov 29 13:41:11 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.12             Driver Version: 535.104.12   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA RTX 6000 Ada Gene...    On  | 00000000:52:00.0  On |                  Off |
| 32%   61C    P2              75W / 300W |   7324MiB / 49140MiB |      5%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2317      G   /usr/lib/xorg/Xorg                          740MiB |
|    0   N/A  N/A      2519      G   /usr/bin/gnome-shell                         57MiB |
|    0   N/A  N/A      2994      G   ...AAAAAAAACAAAAAAAAAA= --shared-files       93MiB |
|    0   N/A  N/A     25264      G   ...0208189,17325718055376231948,262144       60MiB |
|    0   N/A  N/A    652962      G   ...irefox/3358/usr/lib/firefox/firefox      266MiB |
|    0   N/A  N/A    703622      G   blender                                     205MiB |
|    0   N/A  N/A    829624      G   /usr/bin/gnome-control-center                79MiB |
|    0   N/A  N/A    837524      C   python                                      844MiB |
|    0   N/A  N/A    842408      G   ...sion,SpareRendererForSitePerProcess      106MiB |
|    0   N/A  N/A    847224      C   python                                     1046MiB |
|    0   N/A  N/A    855952      C   python                                      984MiB |
|    0   N/A  N/A    856952      C   python                                      914MiB |
|    0   N/A  N/A    857675      C   python                                      730MiB |
|    0   N/A  N/A   1068492      G   meshlab                                      12MiB |
|    0   N/A  N/A   1118791      C   python                                     1046MiB |
+---------------------------------------------------------------------------------------+
```
