From 77309b4df056014172340e2f6959745f270002e0 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 21 Nov 2024 14:32:28 +0100 Subject: [PATCH] Add https://www.reddit.com/r/Ultralytics/ badge (#30) Co-authored-by: UltralyticsAssistant --- README.md | 2 +- gcp/wave_pytorch_gcp.py | 4 ++-- train.py | 8 ++++---- utils/utils.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8c2f931..dbbf58c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Welcome to the [Ultralytics WAVE repository](https://github.com/ultralytics/wave Here, we introduce **WA**veform **V**ector **E**xploitation (WAVE), a novel approach that uses Deep Learning to readout and reconstruct signals from particle physics detectors. This repository contains our open-source codebase and aims to foster collaboration and innovation in this exciting intersection of ML and physics. -[![Ultralytics Actions](https://github.com/ultralytics/wave/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/wave/actions/workflows/format.yml) Discord Ultralytics Forums +[![Ultralytics Actions](https://github.com/ultralytics/wave/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/wave/actions/workflows/format.yml) Discord Ultralytics Forums Ultralytics Reddit ## 🚀 Project Objectives diff --git a/gcp/wave_pytorch_gcp.py b/gcp/wave_pytorch_gcp.py index 4b74dac..b8e88fc 100644 --- a/gcp/wave_pytorch_gcp.py +++ b/gcp/wave_pytorch_gcp.py @@ -117,7 +117,7 @@ def runexample(H, model, str, lr=0.001, amsgrad=False): class LinearAct(torch.nn.Module): - """Applies a linear transformation followed by a Tanh activation to input tensors for neural network layers.""" + """Applies a linear transformation followed by Tanh activation to the input tensor.""" def __init__(self, nx, ny): """Initializes the LinearAct module with input and output dimensions and defines a linear transformation @@ -133,7 +133,7 @@ def forward(self, x): class WAVE(torch.nn.Module): - """A neural network model for processing waveform data using linear layers and activation functions.""" + """A neural network model for waveform data processing with multiple linear and activation layers.""" def __init__(self, n): # n = [512, 108, 23, 5, 1] """Initializes the WAVE model with specified linear layers and activation functions.""" diff --git a/train.py b/train.py index 59907e3..0fbc862 100644 --- a/train.py +++ b/train.py @@ -122,7 +122,7 @@ def train(H, model, str, lr=0.001): # 400 5.1498e-05 0.023752 12.484 0.15728 # var 0 class WAVE(torch.nn.Module): - """Implements a neural network model for waveform data processing using a multi-layer perceptron architecture.""" + """A neural network model for waveform data regression with three fully connected layers.""" def __init__(self, n=(512, 64, 8, 2)): """Initializes the WAVE model architecture with specified layer sizes.""" @@ -141,7 +141,7 @@ def forward(self, x): # x.shape = [bs, 512] # https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/02-intermediate # 121 0.47059 0.0306 14.184 0.1608 class WAVE4(nn.Module): - """Implements a convolutional neural network for waveform data processing with customizable output layers.""" + """Implements a convolutional neural network for waveform data processing with configurable output layers.""" def __init__(self, n_out=2): """Initializes the WAVE4 model with specified output layers and configurations for convolutional layers.""" @@ -174,7 +174,7 @@ def forward(self, x): # x.shape = [bs, 512] # 65 4.22e-05 0.021527 11.883 0.14406 class WAVE3(nn.Module): - """WAVE3 implements a convolutional neural network for feature extraction and classification on waveform data.""" + """Implements a convolutional neural network for feature extraction and classification from waveform data.""" def __init__(self, n_out=2): """Initializes the WAVE3 class with neural network layers for feature extraction and classification in a @@ -221,7 +221,7 @@ def forward(self, x): # x.shape = [bs, 512] # 121 2.6941e-05 0.021642 11.923 0.14201 # var 1 class WAVE2(nn.Module): - """Implements a convolutional neural network for waveform data processing with configurable output dimensions.""" + """Implements the WAVE2 model for processing input tensors through convolutional layers for feature extraction.""" def __init__(self, n_out=2): """Initializes the WAVE2 model architecture components.""" diff --git a/utils/utils.py b/utils/utils.py index 51277fd..9cc7824 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -72,7 +72,7 @@ def model_info(model): class patienceStopper: - """Monitors training loss and metrics to halt early when no improvement is seen for a specified patience period.""" + """Implements early stopping mechanism for training models based on validation loss and patience criteria.""" def __init__(self, patience=10, verbose=True, epochs=1000, printerval=10): """Initialize a patience stopper with given parameters for early stopping in training."""