Skip to content

Loss function RuntimeError when use BF16 #26

Closed
@liangan1

Description

@liangan1

Description:
when I use the latest IPEX to enable DLRM MLPerf BF16 training on real data, I get the RuntimeError as follows, but there is no this error in tags/v0.1 -b v0.1:
Traceback (most recent call last): File "dlrm_s_pytorch.py", line 988, in <module> E = loss_fn_wrap(Z, T, use_gpu, use_ipex, device) File "dlrm_s_pytorch.py", line 859, in loss_fn_wrap return loss_fn(Z, T.to(device)) File "anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "anaconda3/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 516, in forward return F.binary_cross_entropy(input, target, weight=self.weight, reduction=self.reduction) File "anaconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 2379, in binary_cross_entropy input, target, weight, reduction_enum) RuntimeError: all elements of input should be between 0 and 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions