Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf

This commit fixes the style issues introduced in ee7b2f7 according to the output
from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java
Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt,
Scalafmt, StandardJS, StandardRB, swift-format and Yapf.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Jul 14, 2024
1 parent 1c1b221 commit 52d85ff
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions features/synthetic_data_generation/data_generator.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
# data_generator.py
import synthpop
import tensorflow as tf
from synthpop import Synthesizer
from tensorflow.keras.models import Sequential


def synthetic_data_generation():
# Initialize the synthetic data generator
synthesizer = Synthesizer()

# Define the synthetic data generation algorithm
algorithm = synthesizer.add_algorithm('synthetic_data_generation')
algorithm = synthesizer.add_algorithm("synthetic_data_generation")

# Run the synthetic data generation algorithm
data = algorithm.generate(1000)

return data


# ai_trainer.py
import tensorflow as tf
from tensorflow.keras.models import Sequential


def ai_trainer(data):
# Define the AI training algorithm
model = Sequential()
model.add(tf.keras.layers.Dense(64, activation='relu', input_shape=(10,)))
model.add(tf.keras.layers.Dense(64, activation='relu'))
model.add(tf.keras.layers.Dense(10, activation='softmax'))
model.add(tf.keras.layers.Dense(64, activation="relu", input_shape=(10,)))
model.add(tf.keras.layers.Dense(64, activation="relu"))
model.add(tf.keras.layers.Dense(10, activation="softmax"))

# Compile the AI training algorithm
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
model.compile(
optimizer="adam", loss="categorical_crossentropy", metrics=["accuracy"]
)

# Train the AI model
model.fit(data, epochs=10)
Expand Down

0 comments on commit 52d85ff

Please sign in to comment.