frankenjoe
commited on
Commit
•
6a9abe6
1
Parent(s):
58f18fe
Update README.md
Browse files
README.md
CHANGED
@@ -102,6 +102,7 @@ def process_func(
|
|
102 |
# then we put it on the device
|
103 |
y = processor(x, sampling_rate=sampling_rate)
|
104 |
y = y['input_values'][0]
|
|
|
105 |
y = torch.from_numpy(y).to(device)
|
106 |
|
107 |
# run through model
|
@@ -114,12 +115,12 @@ def process_func(
|
|
114 |
return y
|
115 |
|
116 |
|
117 |
-
process_func(signal, sampling_rate)
|
118 |
# Arousal dominance valence
|
119 |
-
# [[0.
|
120 |
|
121 |
-
process_func(signal, sampling_rate, embeddings=True)
|
122 |
# Pooled hidden states of last transformer layer
|
123 |
-
# [[-0.00752167 0.0065819 -0.
|
124 |
-
#
|
125 |
```
|
|
|
102 |
# then we put it on the device
|
103 |
y = processor(x, sampling_rate=sampling_rate)
|
104 |
y = y['input_values'][0]
|
105 |
+
y = y.reshape(1, -1)
|
106 |
y = torch.from_numpy(y).to(device)
|
107 |
|
108 |
# run through model
|
|
|
115 |
return y
|
116 |
|
117 |
|
118 |
+
print(process_func(signal, sampling_rate))
|
119 |
# Arousal dominance valence
|
120 |
+
# [[0.5460754 0.6062266 0.40431657]]
|
121 |
|
122 |
+
print(process_func(signal, sampling_rate, embeddings=True))
|
123 |
# Pooled hidden states of last transformer layer
|
124 |
+
# [[-0.00752167 0.0065819 -0.00746342 ... 0.00663632 0.00848748
|
125 |
+
# 0.00599211]]
|
126 |
```
|