以下は、Keras¹を使用した、MNISTデータセット用のPythonによるシンプルなニューラルネットワークのサンプルコードです：

```python
import tensorflow as tf
import tensorflow_datasets as tfds

# Load MNIST dataset
(ds_train, ds_test), ds_info = tfds.load(
    'mnist',
    split=['train', 'test'],
    shuffle_files=True,
    as_supervised=True,
    with_info=True,
)

# Build training pipeline
ds_train = ds_train.map(
    lambda img, label: (tf.cast(img, tf.float32) / 255., label),
).cache().shuffle(ds_info.splits['train'].num_examples).batch(128).prefetch(tf.data.experimental.AUTOTUNE)

# Build evaluation pipeline
ds_test = ds_test.map(
    lambda img, label: (tf.cast(img, tf.float32) / 255., label),
).batch(128).cache().prefetch(tf.data.experimental.AUTOTUNE)

# Create and train the model
model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dense(10)
])
model.compile(
    optimizer=tf.keras.optimizers.Adam(0.001),
    loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    metrics=[tf.keras.metrics.SparseCategoricalAccuracy()],
)
model.fit(
    ds_train,
    epochs=6,
    validation_data=ds_test,
)
```
Hier ist ein Beispielcode für ein einfaches neuronales Netzwerk in Python für den MNIST-Datensatz mit Keras¹:

```python
import tensorflow as tf
import tensorflow_datasets as tfds

# Load MNIST dataset
(ds_train, ds_test), ds_info = tfds.load(
    'mnist',
    split=['train', 'test'],
    shuffle_files=True,
    as_supervised=True,
    with_info=True,
)

# Build training pipeline
ds_train = ds_train.map(
    lambda img, label: (tf.cast(img, tf.float32) / 255., label),
).cache().shuffle(ds_info.splits['train'].num_examples).batch(128).prefetch(tf.data.experimental.AUTOTUNE)

# Build evaluation pipeline
ds_test = ds_test.map(
    lambda img, label: (tf.cast(img, tf.float32) / 255., label),
).batch(128).cache().prefetch(tf.data.experimental.AUTOTUNE)

# Create and train the model
model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dense(10)
])
model.compile(
    optimizer=tf.keras.optimizers.Adam(0.001),
    loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    metrics=[tf.keras.metrics.SparseCategoricalAccuracy()],
)
model.fit(
    ds_train,
    epochs=6,
    validation_data=ds_test,
)
```