Advertisement
KDLPro

Error 2

Apr 24th, 2024
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.78 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. TypeError                                 Traceback (most recent call last)
  3. File D:\ProgramData\Miniconda_3.9\envs\rnn-sample-py3.9\lib\site-packages\torchinfo\torchinfo.py:295, in forward_pass(model, x, batch_dim, cache_forward_pass, device, mode, **kwargs)
  4.     294 if isinstance(x, (list, tuple)):
  5. --> 295     _ = model(*x, **kwargs)
  6.     296 elif isinstance(x, dict):
  7.  
  8. File D:\ProgramData\Miniconda_3.9\envs\rnn-sample-py3.9\lib\site-packages\torch\nn\modules\module.py:1518, in Module._wrapped_call_impl(self, *args, **kwargs)
  9.    1517 else:
  10. -> 1518     return self._call_impl(*args, **kwargs)
  11.  
  12. File D:\ProgramData\Miniconda_3.9\envs\rnn-sample-py3.9\lib\site-packages\torch\nn\modules\module.py:1568, in Module._call_impl(self, *args, **kwargs)
  13.    1566     args = bw_hook.setup_input_hook(args)
  14. -> 1568 result = forward_call(*args, **kwargs)
  15.    1569 if _global_forward_hooks or self._forward_hooks:
  16.  
  17. TypeError: forward() missing 1 required positional argument: 'buffer_in'
  18.  
  19. The above exception was the direct cause of the following exception:
  20.  
  21. RuntimeError                              Traceback (most recent call last)
  22. Cell In[21], line 2
  23.       1 from torchinfo import summary
  24. ----> 2 summary(gps_rnn, input_size=(batch_size, 32, 14, 2))
  25.  
  26. File D:\ProgramData\Miniconda_3.9\envs\rnn-sample-py3.9\lib\site-packages\torchinfo\torchinfo.py:223, in summary(model, input_size, input_data, batch_dim, cache_forward_pass, col_names, col_width, depth, device, dtypes, mode, row_settings, verbose, **kwargs)
  27.     216 validate_user_params(
  28.     217     input_data, input_size, columns, col_width, device, dtypes, verbose
  29.     218 )
  30.     220 x, correct_input_size = process_input(
  31.     221     input_data, input_size, batch_dim, device, dtypes
  32.     222 )
  33. --> 223 summary_list = forward_pass(
  34.     224     model, x, batch_dim, cache_forward_pass, device, model_mode, **kwargs
  35.     225 )
  36.     226 formatting = FormattingOptions(depth, verbose, columns, col_width, rows)
  37.     227 results = ModelStatistics(
  38.     228     summary_list, correct_input_size, get_total_memory_used(x), formatting
  39.     229 )
  40.  
  41. File D:\ProgramData\Miniconda_3.9\envs\rnn-sample-py3.9\lib\site-packages\torchinfo\torchinfo.py:304, in forward_pass(model, x, batch_dim, cache_forward_pass, device, mode, **kwargs)
  42.     302 except Exception as e:
  43.     303     executed_layers = [layer for layer in summary_list if layer.executed]
  44. --> 304     raise RuntimeError(
  45.     305         "Failed to run torchinfo. See above stack traces for more details. "
  46.     306         f"Executed layers up to: {executed_layers}"
  47.     307     ) from e
  48.     308 finally:
  49.     309     if hooks:
  50.  
  51. RuntimeError: Failed to run torchinfo. See above stack traces for more details. Executed layers up to: []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement