WuJie1010 / Facial-Expression-Recognition.Pytorch

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset
MIT License
1.8k stars 553 forks source link

mainpro_FER.py #50

Closed David-on-Code closed 5 years ago

David-on-Code commented 5 years ago

RuntimeError: error executing torch_shm_manager at "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/bin/torch_shm_manager" at ../torch/lib/libshm/core.cpp:99

David-on-Code commented 5 years ago

how to solve it

WuJie1010 commented 5 years ago

Maybe you should use Python 2.7 and Pytorch ==0.4.0

David-on-Code commented 5 years ago

could I run it without GPU?

WuJie1010 commented 5 years ago

YES! https://github.com/WuJie1010/Facial-Expression-Recognition.Pytorch/issues/9

xingchenbian commented 5 years ago

1、Can't it run on Windows 10? When I download with win10, tell me the following:

PyTorch does not support Python 2.7 on Windows. Please install with Python 3.

2、I use win10, python3.7, pytorch2.0, and the error is as follows: C:\ProgramData\Anaconda3\envs\abc\python.exe C:/Users/Facial-Expression-Recognition.Pytorch-master/preprocess_fer2013.py Warning! HDF5 library version mismatched error The HDF5 header files used to compile this application do not match the version used by the HDF5 library to which this application is linked. Data corruption or segmentation faults may occur if the application continues. This can happen when an application was compiled by one version of HDF5 but linked with a different version of static or shared HDF5 library. You should recompile the application or check your shared library related settings such as 'LD_LIBRARY_PATH'. You can, at your own risk, disable this warning by setting the environment variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'. Setting it to 2 or higher will suppress the warning messages totally. Headers are 1.10.4, library is 1.10.5 SUMMARY OF THE HDF5 CONFIGURATION

General Information:

               HDF5 Version: 1.10.5
              Configured on: 2019-03-04
              Configured by: Visual Studio 15 2017 Win64
                Host system: Windows-10.0.17763
          Uname information: Windows
                   Byte sex: little-endian
         Installation point: C:/Program Files/HDF5

Compiling Options:

                 Build Mode: 
          Debugging Symbols: 
                    Asserts: 
                  Profiling: 
         Optimization Level: 

Linking Options:

                  Libraries: 

Statically Linked Executables: OFF LDFLAGS: /machine:x64 H5_LDFLAGS: AM_LDFLAGS: Extra libraries: Archiver: Ranlib:

Languages:

                          C: yes
                 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe 19.16.27027.1
                   CPPFLAGS: 
                H5_CPPFLAGS: 
                AM_CPPFLAGS: 
                     CFLAGS:  /DWIN32 /D_WINDOWS /W3
                  H5_CFLAGS: 
                  AM_CFLAGS: 
           Shared C Library: YES
           Static C Library: YES

                    Fortran: OFF
           Fortran Compiler:  
              Fortran Flags: 
           H5 Fortran Flags: 
           AM Fortran Flags: 
     Shared Fortran Library: YES
     Static Fortran Library: YES

                        C++: ON
               C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe 19.16.27027.1
                  C++ Flags: /DWIN32 /D_WINDOWS /W3 /GR /EHsc
               H5 C++ Flags: 
               AM C++ Flags: 
         Shared C++ Library: YES
         Static C++ Library: YES

                        JAVA: OFF
               JAVA Compiler:  

Features:

               Parallel HDF5: OFF

Parallel Filtered Dataset Writes: Large Parallel I/O: High-level library: ON Threadsafety: OFF Default API mapping: v110 With deprecated public symbols: ON I/O filters (external): DEFLATE DECODE ENCODE MPE: Direct VFD: dmalloc: Packages w/ extra debug output: API Tracing: OFF Using memory checker: OFF Memory allocation sanity checks: OFF Function Stack Tracing: OFF Strict File Format Checks: OFF Optimization Instrumentation: Bye...

Process finished with exit code -1073740791 (0xC0000409) Please tell me how to solve it? Thank you very much.

David-on-Code commented 5 years ago

43: FER2013_VGG19 ==> Preparing data.. trainset <fer.FER2013 object at 0x11540b250> trainloade <torch.utils.data.dataloader.DataLoader object at 0x114918450> 69--------- False ==> Building model.. 93---- 217---

Epoch: 0 99--- learning_rate: 0.01 112 for Traceback (most recent call last): File "mainpro_FER.py", line 224, in train(epoch) File "mainpro_FER.py", line 116, in train for batch_idx, (inputs, targets) in enumerate(trainloader): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise raise self.exc_type(msg) RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 79, in default_collate return [default_collate(samples) for samples in transposed] File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 79, in return [default_collate(samples) for samples in transposed] File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/utils/data/_utils/collate.py", line 53, in default_collate storage = elem.storage()._new_shared(numel) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/storage.py", line 128, in _new_shared return cls._new_using_filename(size) RuntimeError: error executing torch_shm_manager at "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/torch/bin/torch_shm_manager" at ../torch/lib/libshm/core.cpp:99

David-on-Code commented 5 years ago

please,tell me how to solve it.Many thanks