Transformers4Rec icon indicating copy to clipboard operation
Transformers4Rec copied to clipboard

[QST] Accessing the model architectures separately.

Open shamanez opened this issue 3 years ago • 1 comments

Similar HuggingFace Transformers is there a way to import model architectures and explore them.

from transformers import BertModel, BertConfig

# Initializing a BERT bert-base-uncased style configuration
configuration = BertConfig()

# Initializing a model from the bert-base-uncased style configuration
model = BertModel(configuration)

# Accessing the model configuration
configuration = model.config

shamanez avatar Jun 24 '22 12:06 shamanez

@shamanez thanks for the question. If you want to print out the model architecture you can simply run model in a jupyter notebook cell.

rnyak avatar Aug 02 '22 14:08 rnyak

closing due to no recent activities.

rnyak avatar Oct 06 '22 15:10 rnyak