google / google/gin-config

[Question] How to define a parameter based on a defined one

Open
#182 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.2k
Forks
122
Avg merge
5d 10h
Merged PRs (30d)
2

Description

In `config.gin`, I cannot do something like
```python
GAT.embed_dim = 30 # this is for init of GAT

Attention.node_ft_dim = GAT.__init__.embed_dim
# Attention.node_ft_dim = GAT.embed_dim # this won't work too
```
It won't work even when I
```
@gin.register
@gin.configurable
class GAT(nn.Module):
```

Is this feature implemented?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.