google-research / google-research/tf-slim
How to access weights
- Dominant language
- Python
- Stars
- 374
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
If I have something like this:
```
def my_darknet53(inputs):
inputs = slim.conv2d(inputs, 32, 3, scope='conv-0')
inputs = slim.conv2d(inputs, 64, 3, stride=2, scope='conv-1')
inputs = darknet_block(inputs, 32, scope='dn-block-1')
inputs = slim.conv2d(inputs, 128, 3, stride=2, scope='conv-3')
inputs = slim.repeat(inputs, 2, darknet_block, 64, scope='dn-block-2')
inputs = slim.conv2d(inputs, 256, 3, stride=2, scope='conv-4')
inputs = slim.repeat(inputs, 8, darknet_block, 128, scope='dn-block-3')
inputs = slim.conv2d(inputs, 512, 3, stride=2, scope='conv-5')
inputs = slim.repeat(inputs, 8, darknet_block, 256, scope='dn-block-4')
inputs = slim.conv2d(inputs, 1024, 3, stride=2, scope='conv-6')
inputs = slim.repeat(inputs, 4, darknet_block, 512, scope='dn-block-5')
return inputs
```
How can I access the weights of 'conv-0' for example?
Contributor guide
Research direction
Start with the `my_darknet53` definition and the `conv-0` layer usage shown in the issue, then inspect tf-slim's variable and weight-access documentation. Done means providing a confirmed explanation of how to retrieve that layer's weights, with a small example and a relevant documentation location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100