Issue running the code
I ran GNN_decoder_BCH.ipynb, but encountered an error in the GNN-based Decoding section. Here's a specific example:
''' tf.random.set_seed(2) # we fix the seed to ensure stable convergence
Initialize the GNN decoder
gnn_decoder = GNN_BP( pcm=pcm, num_embed_dims=params["num_embed_dims"], num_msg_dims=params["num_msg_dims"], num_hidden_units=params["num_hidden_units"], num_mlp_layers=params["num_mlp_layers"], num_iter=params["num_iter"], reduce_op=params["reduce_op"], activation=params["activation"], output_all_iter=True, clip_llr_to=params["clip_llr_to"], use_attributes=params["use_attributes"], node_attribute_dims=params["node_attribute_dims"], msg_attribute_dims=params["msg_attribute_dims"], use_bias=params["use_bias"] )
e2e_gnn = E2EModel(encoder, gnn_decoder, k, n) e2e_gnn(1, 1.0) '''
When executing this code, the following error occurs at e2e_gnn(1, 1.0):
InvalidArgumentError Traceback (most recent call last)
c:\Users\PC\anaconda3\envs\0jun\lib\site-packages\keras\engine\base_layer.py in call(self, *args, **kwargs) 1035 with autocast_variable.enable_auto_cast_variables( 1036 self._compute_dtype_object): -> 1037 outputs = call_fn(inputs, *args, **kwargs) 1038 1039 if self._activity_regularizer:
~\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\eager\def_function.py in call(self, *args, **kwds) 883 884 with OptionalXlaContext(self._jit_compile): --> 885 result = self._call(*args, **kwds) 886 887 new_tracing_count = self.experimental_get_tracing_count()
~\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\eager\def_function.py in _call(self, *args, **kwds) 948 # Lifting succeeded, so variables are initialized and we can run the 949 # stateless function. --> 950 return self._stateless_fn(*args, **kwds) ... if self._reduce_op=="sum": File "c:\Users\PC\Desktop\GNN_cascade\gnn1.py", line 426, in call elif self._reduce_op=="mean": File "c:\Users\PC\Desktop\GNN_cascade\gnn1.py", line 427, in call m = tf.reduce_mean(m_ragged, axis=1) [Op:__inference_call_319794]
Hi @yj-ai, which version of TF and Sionna are you using? Did you modify the notebook before running?