google / gin-config

Gin provides a lightweight configuration framework for Python
Apache License 2.0
2.05k stars 120 forks source link

why I can't use @ ? #161

Closed huxiaobo007 closed 2 years ago

huxiaobo007 commented 2 years ago

I always get an error when using the @ symbol in the .gin file for example: when I uesd dnn.activation_fn = @tf.nn.tanh; ValueError: No configurable matching reference '@tf.nn.tanh' Whatever @ I use , I always get the error.

akjskakjsas commented 2 years ago

I meet this issue too!!! maybe you should add import gin.tf.external_configurables

sguada commented 2 years ago

Yeah you need to import gin.tf.external_configurables