Examples¶
Example Models¶
The Determined distribution contains several example experiments in the
examples/
subdirectory. Each experiment consists of a single
model definition and one or more experiment configurations.
Framework |
Dataset |
---|---|
PyTorch |
|
PyTorch |
|
TensorFlow (Estimator API) |
|
TensorFlow (tf.keras) |
TensorBoard Integration¶
This example shows how to use Determined with TensorBoard to visualize training and/or validation metrics.
To configure TensorBoard with Determined, follow these steps:
Set up a directory on a shared file system for TensorBoard event files, e.g.
/mnt/tensorboard
. All agents must be able to write to this directory.Add an entry to the experiment config to ensure that the shared directory is mounted into each trial container. In this example, we use
/tensorboard
as the container path:
bind_mounts:
- host_path: /mnt/tensorboard
container_path: /tensorboard
Implement the
callbacks()
interface in your model definition. Use yourcontainer_path
(/tensorboard
in this example) as thelog_directory
argument.
from determined.estimator import TFEventWriter
class MNISTTrial(EstimatorTrial):
...
def callbacks(self, hparams):
return TFEventWriter("/tensorboard")
...
Start TensorBoard using the
host_path
from step 2 to view the experiment metrics as the experiment is running or after it has ended.
tensorboard --logdir=/mnt/tensorboard