We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flow.nn.CrossEntropyLoss
Creating an incompatible input shape for CrossEntropyLoss triggers a crash.
import oneflow as flow input = flow.tensor([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=flow.float32) target = flow.tensor([3], dtype=flow.int32) loss = flow.nn.CrossEntropyLoss(reduction="mean") loss(input, target)
output:
F20241205 08:53:04.650667 2384974 shape.h:140] Check failed: is_initialized() *** Check failure stack trace: *** @ 0x7fd5fe3d09ca google::LogMessage::Fail() @ 0x7fd5fe3d0cb2 google::LogMessage::SendToLog() @ 0x7fd5fe3d0537 google::LogMessage::Flush() @ 0x7fd5fe3d30a9 google::LogMessageFatal::~LogMessageFatal() @ 0x7fd5f3ccbc6b oneflow::ConstShapeMixIn<>::Count() @ 0x7fd5f747cdd2 oneflow::one::functional::impl::ReshapeFunctor::operator()() @ 0x7fd5f747d2dc _ZNSt17_Function_handlerIFN7oneflow5MaybeINS0_3one6TensorEvEERKSt10shared_ptrIS3_ERKNS0_5ShapeEEZNS2_10functional18PackedFunctorMakerISC_E4makeINSD_4impl14ReshapeFunctorELi0EEENSD_13PackedFunctorISC_EERKSsRKT_EUlS8_SB_E_E9_M_invokeERKSt9_Any_dataS8_SB_ @ 0x7fd5fa863424 oneflow::one::functional::Reshape() @ 0x7fd5f778bf1c oneflow::one::functional::impl::CrossEntropyFunctor::operator()() @ 0x7fd5f778c9c4 _ZNSt17_Function_handlerIFN7oneflow5MaybeINS0_3one6TensorEvEERKSt10shared_ptrIS3_ES8_RKNS0_8OptionalIS3_EERKlRKSsRKdEZNS2_10functional18PackedFunctorMakerISJ_E4makeINSK_4impl19CrossEntropyFunctorELi0EEENSK_13PackedFunctorISJ_EESG_RKT_EUlS8_S8_SC_SE_SG_SI_E_E9_M_invokeERKSt9_Any_dataS8_S8_SC_SE_SG_SI_ @ 0x7fd5fa8846f5 oneflow::one::functional::CrossEntropy() @ 0x7fd6dd974be9 oneflow::one::functional::cross_entropy() @ 0x507397 cfunction_call @ 0x4f065c _PyObject_MakeTpCall @ 0x4ecb4d _PyEval_EvalFrameDefault @ 0x4f80b3 function_code_fastcall @ 0x505131 method_vectorcall @ 0x4eba52 _PyEval_EvalFrameDefault @ 0x4e69da _PyEval_EvalCode @ 0x4efece _PyObject_FastCallDictTstate @ 0x502d86 _PyObject_Call_Prepend @ 0x5cb113 slot_tp_call @ 0x4f065c _PyObject_MakeTpCall @ 0x4ec553 _PyEval_EvalFrameDefault @ 0x4e69da _PyEval_EvalCode @ 0x4e6667 _PyEval_EvalCodeWithName @ 0x4e6619 PyEval_EvalCodeEx @ 0x5938eb PyEval_EvalCode @ 0x5c1157 run_eval_code_obj @ 0x5bd170 run_mod @ 0x456423 pyrun_file.cold @ 0x5b6e52 PyRun_SimpleFileExFlags Aborted (core dumped)
python3 -m oneflow --doctor
path: ['/home/miniconda3/envs/oneflow/lib/python3.9/site-packages/oneflow'] version: 0.9.0 git_commit: 381b12c cmake_build_type: Release rdma: True mlir: True
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Creating an incompatible input shape for CrossEntropyLoss triggers a crash.
Code to reproduce bug
output:
System Information
python3 -m oneflow --doctor
):The text was updated successfully, but these errors were encountered: