April 4, 2022, 7:21 p.m. | /u/No_Possibility_7588

Deep Learning www.reddit.com

Given a NN class, is there something specific we need to care of when converting \*args and \*\*kwargs to a canonical kwarg representation? I ask this because in this code from Google ([https://github.com/google-research/google-research/blob/c56b47713b08c95ad427d5f93ee0dbb9ad008964/social\_rl/multiagent\_tfagents/joint\_attention/attention\_networks.py#L557](https://github.com/google-research/google-research/blob/c56b47713b08c95ad427d5f93ee0dbb9ad008964/social_rl/multiagent_tfagents/joint_attention/attention_networks.py#L557)) they use a TFDecorator-aware replacement for inspect.getcallargs, instead of using getcallargs directly. So my questions are:


\- Is it possible to use inspect.getcallargs to convert \*args and \*\*kwargs to a canonical kwarg representation?
\- If no, is there an equivalent in PyTorch? I couldn't find any, so …

canonical deeplearning dl representation

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US