Skip to content

Error in testing phase #21

@fly2tortoise

Description

@fly2tortoise

Respected researchers
I am having a lot of problems running test_extractor_pa.py, can you help me out?
I'm running python3.9,torch11.8,tf2.13.
It looks like the model can't be imported or there is some problem with the dataset.

(fsl) YYM@ubuntu:~/NewResearchDirection/URL$ bash ./scripts/test_resnet18_pa.sh
2024-04-27 22:07:47.187378: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-04-27 22:07:47.225910: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-27 22:07:47.784984: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT

['ilsvrc_2012', 'omniglot', 'aircraft', 'cu_birds', 'dtd', 'quickdraw', 'fungi', 'vgg_flower'] ['ilsvrc_2012', 'omniglot', 'aircraft', 'cu_birds', 'dtd', 'quickdraw', 'fungi', 'vgg_flower', 'traffic_sign', 'mscoco', 'mnist', 'cifar10', 'cifar100']
2024-04-27 22:07:49.159644: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 19140 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4090, pci bus id: 0000:18:00.0, compute capability: 8.9
=> loading best checkpoint './saved_results/url/weights/url/model_best.pth.tar'
2024-04-27 22:08:09.164747: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 19140 MB memory: -> device: 0, name: NVIDIA GeForce RTX 4090, pci bus id: 0000:18:00.0, compute capability: 8.9
ilsvrc_2012
0%| | 0/600 [00:00<?, ?it/s]2024-04-27 22:08:09.599796: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:375] MLIR V1 optimization pass is not enabled
2024-04-27 22:08:12.346139: I tensorflow/core/grappler/optimizers/data/replicate_on_split.cc:32] Running replicate on split optimization
2024-04-27 22:08:12.922567: W tensorflow/core/framework/op_kernel.cc:1816] INVALID_ARGUMENT: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (15,) + inhomogeneous part.
Traceback (most recent call last):

File "/home/YYM/anaconda3/envs/fsl/lib/python3.9/site-packages/tensorflow/python/ops/script_ops.py", line 268, in call
ret = func(*args)

File "/home/YYM/anaconda3/envs/fsl/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py", line 643, in wrapper
return func(*args, **kwargs)

File "/home/YYM/anaconda3/envs/fsl/lib/python3.9/site-packages/tensorflow/python/data/ops/from_generator_op.py", line 198, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))

File "/home/YYM/NewResearchDirection/meta-dataset/meta_dataset/data/reader.py", line 132, in episode_representation_generator
episode_description = sampler.sample_episode_description()

File "/home/YYM/NewResearchDirection/meta-dataset/meta_dataset/data/sampling.py", line 487, in sample_episode_description
class_ids = self.sample_class_ids()

File "/home/YYM/NewResearchDirection/meta-dataset/meta_dataset/data/sampling.py", line 424, in sample_class_ids
episode_classes_rel = self._rng.choice(self.span_leaves_rel)

File "mtrand.pyx", line 920, in numpy.random.mtrand.RandomState.choice

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (15,) + inhomogeneous part.

 [[{{node PyFunc}}]]
 [[IteratorGetNext]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions