Open DehaoMeng opened 1 year ago
Sorry, this is the first time I'm using this and it's not very clear
I tested mnist with mps without any errors.But when you use this test, you get errors.This codes come from https://github.com/sentaochen/Decomposed-Adversarial-Domain-Generalization/blob/main/ I changed the cpu of the device to mps
Process: Python [18752] Path: /Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.8.6 (3.8.6) Code Type: X86-64 (Translated) Parent Process: pycharm [9579] Responsible: pycharm [9579] User ID: 501
Date/Time: 2023-05-16 00:20:05.0624 +0800 OS Version: macOS 13.3.1 (22E772610a) Report Version: 12 Anonymous UUID: FFEDBF80-EB46-9192-C073-D146315213C8
Sleep/Wake UUID: 6C51CD80-763F-4F18-9958-99AC2316FA5B
Time Awake Since Boot: 100000 seconds Time Since Wake: 6244 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: metal gpu stream
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000
Thread 0 Crashed:: Dispatch queue: metal gpu stream 0 ??? 0x7ff8995f69a8 ??? 1 libsystem_kernel.dylib 0x7ff8099f31f2 pthread_kill + 10 2 libsystem_pthread.dylib 0x7ff809a2aee6 pthread_kill + 263 3 libsystem_c.dylib 0x7ff809951b45 abort + 123 4 libsystem_c.dylib 0x7ff809950e5e assert_rtn + 314 5 Metal 0x7ff8136d6322 MTLReportFailure.cold.1 + 43 6 Metal 0x7ff8136b1def MTLReportFailure + 529 7 MPSCore 0x7ff81443fd7e 0x7ff81440e000 + 204158 8 MPSNDArray 0x7ff815958c7e 0x7ff81590b000 + 318590 9 MPSMatrix 0x7ff8158fbfbd 0x7ff8158cf000 + 184253 10 MPSNDArray 0x7ff815958a84 0x7ff81590b000 + 318084 11 MPSNDArray 0x7ff81594dfb0 0x7ff81590b000 + 274352 12 MPSNDArray 0x7ff81594f3cb 0x7ff81590b000 + 279499 13 MetalPerformanceShadersGraph 0x7ffa260be260 0x7ffa25fbf000 + 1045088 14 MetalPerformanceShadersGraph 0x7ffa25fd2068 0x7ffa25fbf000 + 77928 15 MetalPerformanceShadersGraph 0x7ffa261217de 0x7ffa25fbf000 + 1451998 16 MetalPerformanceShadersGraph 0x7ffa2611e2c3 0x7ffa25fbf000 + 1438403 17 MetalPerformanceShadersGraph 0x7ffa2614075f 0x7ffa25fbf000 + 1578847 18 MetalPerformanceShadersGraph 0x7ffa261405b8 0x7ffa25fbf000 + 1578424 19 MetalPerformanceShadersGraph 0x7ffa2611d3df 0x7ffa25fbf000 + 1434591 20 MetalPerformanceShadersGraph 0x7ffa261e291b 0x7ffa25fbf000 + 2242843 21 MetalPerformanceShadersGraph 0x7ffa261e19b1 0x7ffa25fbf000 + 2238897 22 MetalPerformanceShadersGraph 0x7ffa26088d78 0x7ffa25fbf000 + 826744 23 MetalPerformanceShadersGraph 0x7ffa260880e1 0x7ffa25fbf000 + 823521 24 libtorch_cpu.dylib 0x1672f03e4 invocation function for block in at::mps::MPSStream::executeMPSGraph(MPSGraph, NSDictionary, NSDictionary, at::mps::SyncType) + 164 25 libdispatch.dylib 0x7ff80988a033 _dispatch_client_callout + 8 26 libdispatch.dylib 0x7ff809897ba1 _dispatch_lane_barrier_sync_invoke_and_complete + 60 27 libtorch_cpu.dylib 0x1672f0327 at::mps::MPSStream::executeMPSGraph(MPSGraph, NSDictionary, NSDictionary, at::mps::SyncType) + 135 28 libtorch_cpu.dylib 0x16735656d at::native::structured_linalg_inv_ex_out_mps::impl(at::Tensor const&, bool, at::Tensor const&, at::Tensor const&) + 1773 29 libtorch_cpu.dylib 0x16484074b at::(anonymous namespace)::wrapper_MPS_linalg_inv_ex(at::Tensor const&, bool) + 107 30 libtorch_cpu.dylib 0x1648ad024 c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<std::1::tuple<at::Tensor, at::Tensor> (at::Tensor const&, bool), &at::(anonymous namespace)::wrapper_MPS_linalg_inv_ex(at::Tensor const&, bool)>, std::1::tuple<at::Tensor, at::Tensor>, c10::guts::typelist::typelist<at::Tensor const&, bool>>, std::1::tuple<at::Tensor, at::Tensor> (at::Tensor const&, bool)>::call(c10::OperatorKernel, c10::DispatchKeySet, at::Tensor const&, bool) + 20 31 libtorch_cpu.dylib 0x163cab01c at::_ops::linalg_inv_ex::redispatch(c10::DispatchKeySet, at::Tensor const&, bool) + 92 32 libtorch_cpu.dylib 0x165adceef c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<std::1::tuple<at::Tensor, at::Tensor> (c10::DispatchKeySet, at::Tensor const&, bool), &torch::autograd::VariableType::(anonymous namespace)::linalg_inv_ex(c10::DispatchKeySet, at::Tensor const&, bool)>, std::1::tuple<at::Tensor, at::Tensor>, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, bool>>, std::__1::tuple<at::Tensor, at::Tensor> (c10::DispatchKeySet, at::Tensor const&, bool)>::call(c10::OperatorKernel, c10::DispatchKeySet, at::Tensor const&, bool) + 895 33 libtorch_cpu.dylib 0x163caad8b at::_ops::linalg_inv_ex::call(at::Tensor const&, bool) + 283 34 libtorch_cpu.dylib 0x162d60dca at::native::linalg_inv(at::Tensor const&) + 42 35 libtorch_cpu.dylib 0x164347171 c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&), &at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutogradlinalg_inv(at::Tensor const&)>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&>>, at::Tensor (at::Tensor const&)>::call(c10::OperatorKernel, c10::DispatchKeySet, at::Tensor const&) + 17 36 libtorch_cpu.dylib 0x163dd58e2 at::_ops::linalg_inv::call(at::Tensor const&) + 274 37 libtorch_python.dylib 0x14670005d torch::autograd::THPVariable_linalg_inv(_object, _object, _object) + 797 38 Python 0x10d887518 cfunction_call_varargs + 120 39 Python 0x10d886f85 _PyObject_MakeTpCall + 373 40 Python 0x10d955945 call_function + 533 41 Python 0x10d95274e _PyEval_EvalFrameDefault + 25678 42 Python 0x10d956734 _PyEval_EvalCodeWithName + 2804 43 Python 0x10d887a6e _PyFunction_Vectorcall + 270 44 Python 0x10d9558ec call_function + 444 45 Python 0x10d952878 _PyEval_EvalFrameDefault + 25976 46 Python 0x10d8878d0 function_code_fastcall + 128 47 Python 0x10d9558ec call_function + 444 48 Python 0x10d95272a _PyEval_EvalFrameDefault + 25642 49 Python 0x10d956734 _PyEval_EvalCodeWithName + 2804 50 Python 0x10d94c224 PyEval_EvalCode + 100 51 Python 0x10d99bed0 PyRun_FileExFlags + 336 52 Python 0x10d99b5c0 PyRun_SimpleFileExFlags + 864 53 Python 0x10d9b8ae3 Py_RunMain + 2179 54 Python 0x10d9b8e3f pymain_main + 223 55 Python 0x10d9b903b Py_BytesMain + 43 56 dyld 0x20501141f start + 1903
Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffd9e694 0x7ff7ffd9a000 + 18068
Thread 2: 0 runtime 0x7ff7ffdbc87c 0x7ff7ffd9a000 + 141436
Thread 3: 0 runtime 0x7ff7ffdbc87c 0x7ff7ffd9a000 + 141436
Thread 4: 0 runtime 0x7ff7ffdbc87c 0x7ff7ffd9a000 + 141436
Thread 5:
0 ??? 0x7ff8995f69a8 ???
1 libsystem_kernel.dylib 0x7ff8099ef0ee psynch_cvwait + 10
2 libsystem_pthread.dylib 0x7ff809a2b758 _pthread_cond_wait + 1242
3 libc++.1.dylib 0x7ff8099681e2 std::__1::condition_variable::wait(std::1::unique_lock
Thread 6:
0 ??? 0x7ff8995f69a8 ???
1 libsystem_kernel.dylib 0x7ff8099ef0ee psynch_cvwait + 10
2 libsystem_pthread.dylib 0x7ff809a2b758 _pthread_cond_wait + 1242
3 libc++.1.dylib 0x7ff8099681e2 std::__1::condition_variable::wait(std::1::unique_lock
Thread 7:
0 ??? 0x7ff8995f69a8 ???
1 libsystem_kernel.dylib 0x7ff8099ef0ee psynch_cvwait + 10
2 libsystem_pthread.dylib 0x7ff809a2b758 _pthread_cond_wait + 1242
3 libc++.1.dylib 0x7ff8099681e2 std::__1::condition_variable::wait(std::1::unique_lock
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x000000010dfb7000 rsi: 0x0000000000000003 rbp: 0xcccccccccccccccd rsp: 0x000000000000002e
r8: 0x00000002050b3280 r9: 0xcccccccccccccccd r10: 0x0000000000000000 r11: 0x00007ff809ae59df
r12: 0x0000000000000103 r13: 0x000000010dfb7028 r14: 0x0000000000000006 r15: 0x0000000000000016
rip:
Binary Images:
0x20500b000 - 0x2050a6fff dyld ()
External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%) Writable regions: Total=2.1G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.1G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 Kernel Alloc Once 8K 1 MALLOC 912.5M 109 MALLOC guard page 96K 4 MALLOC_MEDIUM (reserved) 280.0M 4 reserved VM address space (unallocated) MALLOC_NANO (reserved) 256.0M 1 reserved VM address space (unallocated) Rosetta Arena 4096K 2 Rosetta Generic 1100K 272 Rosetta IndirectBranch 1024K 1 Rosetta JIT 128.0M 1 Rosetta Return Stack 140K 14 Rosetta Thread Context 140K 14 STACK GUARD 12K 3 Stack 19.1M 7 Stack Guard 28K 4 VM_ALLOCATE 106.2M 221 VM_ALLOCATE (reserved) 384.1M 15 reserved VM address space (unallocated) DATA 29.6M 484 DATA_CONST 9536K 152 DATA_DIRTY 437K 86 __FONT_DATA 2352 1 LINKEDIT 292.6M 232 OBJC_RO 66.2M 1 __OBJC_RW 2009K 2 TEXT 729.6M 469 dyld private memory 420K 4 mapped file 4.6G 1948 shared memory 624K 7 unshared pmap 7168K 5 =========== ======= ======= TOTAL 7.7G 4065 TOTAL, minus reserved VM space 6.8G 4065
{"app_name":"Python","timestamp":"2023-05-16 00:20:05.00 +0800","app_version":"3.8.6","slice_uuid":"4a52e177-60c3-3b60-a1c5-3651f5857993","build_version":"3.8.6","platform":1,"bundleID":"org.python.python","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.3.1 (22E772610a)","roots_installed":0,"name":"Python","incident_id":"420094F6-EAA6-4AFE-A719-B8C9AD969665"}
{
"uptime" : 100000,
"procRole" : "Unspecified",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "Mac14,7",
"coalitionID" : 6959,
"osVersion" : {
"train" : "macOS 13.3.1",
"build" : "22E772610a",
"releaseType" : "User"
},
"captureTime" : "2023-05-16 00:20:05.0624 +0800",
"incident" : "420094F6-EAA6-4AFE-A719-B8C9AD969665",
"pid" : 18752,
"translated" : true,
"cpuType" : "X86-64",
"roots_installed" : 0,
"bug_type" : "309",
"procLaunch" : "2023-05-16 00:20:02.3729 +0800",
"procStartAbsTime" : 2487615772875,
"procExitAbsTime" : 2487680311352,
"procName" : "Python",
"procPath" : "\/Library\/Frameworks\/Python.framework\/Versions\/3.8\/Resources\/Python.app\/Contents\/MacOS\/Python",
"bundleInfo" : {"CFBundleShortVersionString":"3.8.6","CFBundleVersion":"3.8.6","CFBundleIdentifier":"org.python.python"},
"storeInfo" : {"deviceIdentifierForVendor":"3B2FE0E8-B58D-58B5-82EE-EA1F0158FEE3","thirdParty":true},
"parentProc" : "pycharm",
"parentPid" : 9579,
"coalitionName" : "com.jetbrains.pycharm",
"crashReporterKey" : "FFEDBF80-EB46-9192-C073-D146315213C8",
"responsiblePid" : 9579,
"responsibleProc" : "pycharm",
"codeSigningID" : "org.python.python",
"codeSigningTeamID" : "DJ3H93M7VJ",
"codeSigningFlags" : 570490881,
"codeSigningValidationCategory" : 6,
"codeSigningTrustLevel" : 0,
"wakeTime" : 6244,
"sleepWakeUUID" : "6C51CD80-763F-4F18-9958-99AC2316FA5B",
"sip" : "enabled",
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":2022312,"threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":14757395258967641293},"r12":{"value":259},"rosetta":{"tmp2":{"value":140703290044904},"tmp1":{"value":140705701783932},"tmp0":{"value":18446744073709551615}},"rbx":{"value":0},"r8":{"value":8674554496,"symbolLocation":0,"symbol":"_main_thread"},"r15":{"value":22},"r10":{"value":0},"rdx":{"value":0},"rdi":{"value":4529549312},"r9":{"value":14757395258967641293},"r13":{"value":4529549352},"rflags":{"value":643},"rax":{"value":0},"rsp":{"value":46},"r11":{"value":140703291038175,"symbolLocation":0,"symbol":"-[NSCFString UTF8String]"},"rcx":{"value":0},"r14":{"value":6},"rsi":{"value":3}},"queue":"metal gpu stream","frames":[{"imageOffset":140705701783976,"imageIndex":228},{"imageOffset":33266,"symbol":"pthread_kill","symbolLocation":10,"imageIndex":229},{"imageOffset":24294,"symbol":"pthread_kill","symbolLocation":263,"imageIndex":230},{"imageOffset":523077,"symbol":"abort","symbolLocation":123,"imageIndex":231},{"imageOffset":519774,"symbol":"assert_rtn","symbolLocation":314,"imageIndex":231},{"imageOffset":1397538,"symbol":"MTLReportFailure.cold.1","symbolLocation":43,"imageIndex":232},{"imageOffset":1248751,"symbol":"MTLReportFailure","symbolLocation":529,"imageIndex":232},{"imageOffset":204158,"imageIndex":233},{"imageOffset":318590,"imageIndex":234},{"imageOffset":184253,"imageIndex":235},{"imageOffset":318084,"imageIndex":234},{"imageOffset":274352,"imageIndex":234},{"imageOffset":279499,"imageIndex":234},{"imageOffset":1045088,"imageIndex":236},{"imageOffset":77928,"imageIndex":236},{"imageOffset":1451998,"imageIndex":236},{"imageOffset":1438403,"imageIndex":236},{"imageOffset":1578847,"imageIndex":236},{"imageOffset":1578424,"imageIndex":236},{"imageOffset":1434591,"imageIndex":236},{"imageOffset":2242843,"imageIndex":236},{"imageOffset":2238897,"imageIndex":236},{"imageOffset":826744,"imageIndex":236},{"imageOffset":823521,"imageIndex":236},{"imageOffset":76952548,"symbol":"invocation function for block in at::mps::MPSStream::executeMPSGraph(MPSGraph, NSDictionary, NSDictionary, at::mps::SyncType)","symbolLocation":164,"imageIndex":225},{"imageOffset":12339,"symbol":"_dispatch_client_callout","symbolLocation":8,"imageIndex":237},{"imageOffset":68513,"symbol":"_dispatch_lane_barrier_sync_invoke_and_complete","symbolLocation":60,"imageIndex":237},{"imageOffset":76952359,"symbol":"at::mps::MPSStream::executeMPSGraph(MPSGraph, NSDictionary, NSDictionary, at::mps::SyncType)","symbolLocation":135,"imageIndex":225},{"imageOffset":77370733,"symbol":"at::native::structured_linalg_inv_ex_out_mps::impl(at::Tensor const&, bool, at::Tensor const&, at::Tensor const&)","symbolLocation":1773,"imageIndex":225},{"imageOffset":32192331,"symbol":"at::(anonymous namespace)::wrapper_MPS_linalg_inv_ex(at::Tensor const&, bool)","symbolLocation":107,"imageIndex":225},{"imageOffset":32636964,"symbol":"c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<std::1::tuple<at::Tensor, at::Tensor> (at::Tensor const&, bool), &at::(anonymous namespace)::wrapper_MPS_linalg_inv_ex(at::Tensor const&, bool)>, std::1::tuple<at::Tensor, at::Tensor>, c10::guts::typelist::typelist<at::Tensor const&, bool>>, std::1::tuple<at::Tensor, at::Tensor> (at::Tensor const&, bool)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, bool)","symbolLocation":20,"imageIndex":225},{"imageOffset":20045852,"symbol":"at::_ops::linalg_inv_ex::redispatch(c10::DispatchKeySet, at::Tensor const&, bool)","symbolLocation":92,"imageIndex":225},{"imageOffset":51707631,"symbol":"c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<std::1::tuple<at::Tensor, at::Tensor> (c10::DispatchKeySet, at::Tensor const&, bool), &torch::autograd::VariableType::(anonymous namespace)::linalg_inv_ex(c10::DispatchKeySet, at::Tensor const&, bool)>, std::1::tuple<at::Tensor, at::Tensor>, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, bool>>, std::1::tuple<at::Tensor, at::Tensor> (c10::DispatchKeySet, at::Tensor const&, bool)>::call(c10::OperatorKernel, c10::DispatchKeySet, at::Tensor const&, bool)","symbolLocation":895,"imageIndex":225},{"imageOffset":20045195,"symbol":"at::_ops::linalg_inv_ex::call(at::Tensor const&, bool)","symbolLocation":283,"imageIndex":225},{"imageOffset":4013514,"symbol":"at::native::linalg_inv(at::Tensor const&)","symbolLocation":42,"imageIndex":225},{"imageOffset":26976625,"symbol":"c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&), &at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutograd__linalg_inv(at::Tensor const&)>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&>>, at::Tensor (at::Tensor const&)>::call(c10::OperatorKernel, c10::DispatchKeySet, at::Tensor const&)","symbolLocation":17,"imageIndex":225},{"imageOffset":21268706,"symbol":"at::_ops::linalg_inv::call(at::Tensor const&)","symbolLocation":274,"imageIndex":225},{"imageOffset":5218397,"symbol":"torch::autograd::THPVariable_linalg_inv(_object, _object, _object*)","symbolLocation":797,"imageIndex":222},{"imageOffset":136472,"symbol":"cfunction_call_varargs","symbolLocation":120,"imageIndex":4},{"imageOffset":135045,"symbol":"_PyObject_MakeTpCall","symbolLocation":373,"imageIndex":4},{"imageOffset":981317,"symbol":"call_function","symbolLocation":533,"imageIndex":4},{"imageOffset":968526,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25678,"imageIndex":4},{"imageOffset":984884,"symbol":"_PyEval_EvalCodeWithName","symbolLocation":2804,"imageIndex":4},{"imageOffset":137838,"symbol":"_PyFunction_Vectorcall","symbolLocation":270,"imageIndex":4},{"imageOffset":981228,"symbol":"call_function","symbolLocation":444,"imageIndex":4},{"imageOffset":968824,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25976,"imageIndex":4},{"imageOffset":137424,"symbol":"function_code_fastcall","symbolLocation":128,"imageIndex":4},{"imageOffset":981228,"symbol":"call_function","symbolLocation":444,"imageIndex":4},{"imageOffset":968490,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":25642,"imageIndex":4},{"imageOffset":984884,"symbol":"_PyEval_EvalCodeWithName","symbolLocation":2804,"imageIndex":4},{"imageOffset":942628,"symbol":"PyEval_EvalCode","symbolLocation":100,"imageIndex":4},{"imageOffset":1269456,"symbol":"PyRun_FileExFlags","symbolLocation":336,"imageIndex":4},{"imageOffset":1267136,"symbol":"PyRun_SimpleFileExFlags","symbolLocation":864,"imageIndex":4},{"imageOffset":1387235,"symbol":"Py_RunMain","symbolLocation":2179,"imageIndex":4},{"imageOffset":1388095,"symbol":"pymain_main","symbolLocation":223,"imageIndex":4},{"imageOffset":1388603,"symbol":"Py_BytesMain","symbolLocation":43,"imageIndex":4},{"imageOffset":25631,"symbol":"start","symbolLocation":1903,"imageIndex":0}]},{"id":2022313,"name":"com.apple.rosetta.exceptionserver","frames":[{"imageOffset":18068,"imageIndex":1}]},{"id":2022371,"frames":[{"imageOffset":141436,"imageIndex":1}]},{"id":2022372,"frames":[{"imageOffset":141436,"imageIndex":1}]},{"id":2022392,"frames":[{"imageOffset":141436,"imageIndex":1}]},{"id":2022395,"frames":[{"imageOffset":140705701783976,"imageIndex":228},{"imageOffset":16622,"symbol":"psynch_cvwait","symbolLocation":10,"imageIndex":229},{"imageOffset":26456,"symbol":"_pthread_cond_wait","symbolLocation":1242,"imageIndex":230},{"imageOffset":57826,"symbol":"std::1::condition_variable::wait(std::__1::unique_lock<std::1::mutex>&)","symbolLocation":18,"imageIndex":238},{"imageOffset":255389,"symbol":"c10::ThreadPool::main_loop(unsigned long)","symbolLocation":237,"imageIndex":226},{"imageOffset":261635,"symbol":"void std::1::thread_proxy<std::1::tuple<std::1::unique_ptr<std::1::thread_struct, std::1::default_delete
},
"deploymentId" : 240000267
},
{
"rolloutId" : "63582c5f8a53461413999550",
"factorPackIds" : {
},
"deploymentId" : 240000002
}
], "experiments" : [
] } }
Model: Mac14,7, BootROM 8422.100.650, proc 8:4:4 processors, 24 GB, SMC Graphics: Apple M2, Apple M2, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: Jan 12 2023 06:32:20 version 18.20.383.14.7.8.149 FWID 01-92e4bc4d Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc.
🐛 Describe the bug
import numpy as np import pandas as pd import scipy.io as sio import numpy.linalg as la from sklearn.preprocessing import scale,LabelEncoder import torch import numpy as np import torch.nn as nn import torch.optim as optim import torch.nn.functional as F
class NeuralNet(nn.Module): """ """
def DAL(FX, y, l, sigma=100, lamda=1e-2): m = FX.shape[0] domain_label = torch.unique(l) n_domain_label = len(domain_label) Delta = torch.as_tensor(y[:, None] == y, dtype=torch.float32, device=FX.device) # construct the label kernel matrix
construct the Gaussian kernel matrix
class DADG: """ The true training batch size per iteration is batch_size num_class num_domain """
def readData(tg, domains): data = sio.loadmat('datasets/PIE/' + tg + '.mat') Xt, yt = data['fea'].astype(np.float64), data['gnd'].ravel() yt = LabelEncoder().fit(yt).transform(yt).astype(np.float64) Xt = scale(Xt / Xt.sum(axis=1, keepdims=True))
domains = ['PIE05', 'PIE07', 'PIE09', 'PIE27', 'PIE29'] DEVICE = torch.device("cuda" if torch.cuda.is_available() else "mps")
domcouples = [] res = []
for tg in domains: X_list, y_list, Xt, yt = readData(tg, domains)
Versions
python3.8.6 pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu macOS Ventura 13.3.1(a)
cc @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev