(model)
| 157 | |
| 158 | |
| 159 | def get_model_buffer(model): |
| 160 | state_dict = model.state_dict() |
| 161 | buffers_ = {} |
| 162 | params_ = {n: p for n, p in model.named_parameters()} |
| 163 | |
| 164 | for k in state_dict: |
| 165 | if k not in params_: |
| 166 | buffers_[k] = state_dict[k] |
| 167 | return buffers_ |
nothing calls this directly
no test coverage detected