Skip to content

Commit

Permalink
Merge pull request #5 from stellarpower/patch-1
Browse files Browse the repository at this point in the history
Lint example in Readme
  • Loading branch information
gabrielspadon committed Apr 25, 2024
2 parents af3410c + 85da628 commit 5be8483
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ The execution of this loss function is tested on tf~v2. User can install `tensor
`python setup.py build_ext --inplace`

# Example
```import tensorflow as tf
```python
import tensorflow as tf
from tensorflow.keras import layers
import numpy as np
from tensorflow import keras

from softdtwkeras.SDTWLoss import SDTWLoss

np.random.seed(42)
input_data = np.random.random((128, 5, 2))
output_data = np.random.random((128, 3, 2))
input_data = np.random.random((128, 5, 2))
output_data = np.random.random((128, 3, 2))

input_tensor = tf.convert_to_tensor(input_data, dtype=tf.float32)
input_tensor = tf.convert_to_tensor( input_data, dtype=tf.float32)
output_tensor = tf.convert_to_tensor(output_data, dtype=tf.float32)

# Define the model
Expand Down

0 comments on commit 5be8483

Please sign in to comment.