When creating custom losses, you might encounter compilation failures. To address this, wrap your custom loss class with the @autogen_loss decorator, which enables AutoGen to handle the compilation of these custom losses efficiently.
Copy
Ask AI
from cerebras_pytorch/src/cerebras/pytorch/nn/modules import autogen_loss@autogen_lossclass CustomLoss(nn.Module): def __init__(self, ...):