Skip to content

Instantly share code, notes, and snippets.

View vra's full-sized avatar
💻
Exploring the fantastic world

Yunfeng Wang vra

💻
Exploring the fantastic world
View GitHub Profile
diff --git a/modeling_whisper_official0.py b/modeling_whisper0.py
index 1285034..4ab3bb0 100644
--- a/modeling_whisper_official0.py
+++ b/modeling_whisper0.py
@@ -1,4 +1,4 @@
-class WhisperEncoder(WhisperPreTrainedModel):
+class WhisperVQEncoder(WhisperPreTrainedModel):
"""
Transformer encoder consisting of *config.encoder_layers* self attention layers. Each layer is a
[`WhisperEncoderLayer`].
@vra
vra / pre-commit
Last active March 15, 2024 06:48
#!/bin/sh
hard_limit=$(git config hooks.filesizehardlimit)
soft_limit=$(git config hooks.filesizesoftlimit)
: ${hard_limit:=10000000}
: ${soft_limit:=1000000}
list_new_or_modified_files()
{
git diff --staged --name-status|sed -e '/^D/ d; /^D/! s/.\s\+//'
}
import tensorflow as tf
import numpy as np
# Define Networks
# Define cross entropy loss
# Run session
# Calculate accuracy
# Output result