How xiaohan-chen/bear_fault_diagnosis works
This repository provides a bearing-fault diagnosis baseline: vibration data from CWRU .mat files is segmented, prepared for classification, passed through a multi-scale CNN–LSTM, and used to train and evaluate a model whose weights are saved. The current PyTorch implementation is the principal workflow; the README identifies the notebook as an unmaintained Keras version. generate_data.py is a separate legacy data-loading utility. Some orchestration details fall in omitted excerpts, so those links are marked unverified rather than inferred as direct calls.
Main entry points: cnn_lstm_model.py Training entry point · generate_data.py Legacy MAT loader · cnn_lstm_model.ipynb Keras notebook baseline
Components 10
Data preparation
- MAT data loader
cnn_lstm_model.py - Label and sample preparation
cnn_lstm_model.py
Diagnosis model
- Training entry point
cnn_lstm_model.py - Multi-scale CNN–LSTM
cnn_lstm_model.py - Training and evaluation
cnn_lstm_model.py - Saved model weights
Legacy implementation
- Legacy MAT loader
generate_data.py - Keras notebook baseline
cnn_lstm_model.ipynb
Other components
- Researcher
- CWRU MAT files
Connections 10
- Researcher → Training entry point: runs
cnn_lstm_model.py - CWRU MAT files → MAT data loader: provides MAT files
README.md - Training entry point → MAT data loader: loads data
cnn_lstm_model.py - MAT data loader → Label and sample preparation: returns samples and labels
cnn_lstm_model.py - Training entry point → Label and sample preparation: prepares training data
cnn_lstm_model.py - Training entry point → Training and evaluation: trains and evaluates
cnn_lstm_model.py - Training and evaluation → Multi-scale CNN–LSTM: calls forward
cnn_lstm_model.py - Training entry point → Saved model weights: saves weights
cnn_lstm_model.py - CWRU MAT files → Legacy MAT loader: reads MAT files
generate_data.py - Researcher → Keras notebook baseline: can use
README.md