Skip to content

Commit

Permalink
Cleanup API and remove 'experimental' warning (pytorch#21786)
Browse files Browse the repository at this point in the history
Summary:
This cleans up the `torch.utils.tensorboard` API to remove all kwargs usage (which isn't clear to the  user) and removes the "experimental" warning in prep for our 1.2 release.

We also don't need the additional PyTorch version checks now that we are in the codebase itself.

cc ezyang lanpa natalialunova
Pull Request resolved: pytorch#21786

Reviewed By: natalialunova

Differential Revision: D15854892

Pulled By: orionr

fbshipit-source-id: 06b8498826946e578824d4b15c910edb3c2c20c6
  • Loading branch information
orionr authored and facebook-github-bot committed Jul 17, 2019
1 parent 2630109 commit 4861527
Show file tree
Hide file tree
Showing 8 changed files with 1,440 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PyTorch is an optimized tensor library for deep learning using GPUs and CPUs.
torch.utils.data <data>
torch.utils.dlpack <dlpack>
torch.utils.model_zoo <model_zoo>
torch.utils.tensorboard (experimental) <tensorboard>
torch.utils.tensorboard <tensorboard>
onnx
torch.__config__ <__config__>

Expand Down
9 changes: 2 additions & 7 deletions docs/source/tensorboard.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
torch.utils.tensorboard
===================================

.. warning::

This code is EXPERIMENTAL and might change in the future. It also
currently does not support all model types for ``add_graph``, which
we are actively working on.

Before going further, more details on TensorBoard can be found at
https://www.tensorflow.org/tensorboard/

Expand Down Expand Up @@ -86,7 +80,6 @@ Expected result:
.. automethod:: add_scalar
.. automethod:: add_scalars
.. automethod:: add_histogram
.. automethod:: add_histogram_raw
.. automethod:: add_image
.. automethod:: add_images
.. automethod:: add_figure
Expand All @@ -98,3 +91,5 @@ Expected result:
.. automethod:: add_pr_curve
.. automethod:: add_custom_scalars
.. automethod:: add_mesh
.. automethod:: flush
.. automethod:: close
319 changes: 319 additions & 0 deletions test/expect/TestTensorBoard.test_simple_cnnmodel.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
node {
name: "conv1/XavierFill"
op: "XavierFill"
attr {
key: "_output_shapes"
value {
list {
shape {
dim {
size: 96
}
dim {
size: 3
}
dim {
size: 11
}
dim {
size: 11
}
}
}
}
}
}
node {
name: "conv1/ConstantFill"
op: "ConstantFill"
attr {
key: "_output_shapes"
value {
list {
shape {
dim {
size: 96
}
}
}
}
}
}
node {
name: "classifier/XavierFill"
op: "XavierFill"
attr {
key: "_output_shapes"
value {
list {
shape {
dim {
size: 1000
}
dim {
size: 4096
}
}
}
}
}
}
node {
name: "classifier/ConstantFill"
op: "ConstantFill"
attr {
key: "_output_shapes"
value {
list {
shape {
dim {
size: 1000
}
}
}
}
}
}
node {
name: "conv1/Conv"
op: "Conv"
input: "conv1/data"
input: "conv1/conv1_w"
input: "conv1/conv1_b"
attr {
key: "exhaustive_search"
value {
i: 0
}
}
attr {
key: "kernel"
value {
i: 11
}
}
attr {
key: "order"
value {
s: "NCHW"
}
}
attr {
key: "stride"
value {
i: 4
}
}
}
node {
name: "conv1/Relu"
op: "Relu"
input: "conv1/conv1"
attr {
key: "cudnn_exhaustive_search"
value {
i: 0
}
}
attr {
key: "order"
value {
s: "NCHW"
}
}
}
node {
name: "conv1/MaxPool"
op: "MaxPool"
input: "conv1/conv1_1"
attr {
key: "cudnn_exhaustive_search"
value {
i: 0
}
}
attr {
key: "kernel"
value {
i: 2
}
}
attr {
key: "order"
value {
s: "NCHW"
}
}
attr {
key: "stride"
value {
i: 2
}
}
}
node {
name: "classifier/FC"
op: "FC"
input: "conv1/pool1"
input: "classifier/fc_w"
input: "classifier/fc_b"
attr {
key: "cudnn_exhaustive_search"
value {
i: 0
}
}
attr {
key: "order"
value {
s: "NCHW"
}
}
attr {
key: "use_cudnn"
value {
i: 1
}
}
}
node {
name: "classifier/Softmax"
op: "Softmax"
input: "classifier/fc"
attr {
key: "cudnn_exhaustive_search"
value {
i: 0
}
}
attr {
key: "order"
value {
s: "NCHW"
}
}
}
node {
name: "classifier/LabelCrossEntropy"
op: "LabelCrossEntropy"
input: "classifier/pred"
input: "classifier/label"
}
node {
name: "classifier/AveragedLoss"
op: "AveragedLoss"
input: "classifier/xent"
}
node {
name: "conv1/conv1_w"
op: "Blob"
input: "conv1/XavierFill:0"
}
node {
name: "conv1/conv1_b"
op: "Blob"
input: "conv1/ConstantFill:0"
}
node {
name: "classifier/fc_w"
op: "Blob"
input: "classifier/XavierFill:0"
}
node {
name: "classifier/fc_b"
op: "Blob"
input: "classifier/ConstantFill:0"
}
node {
name: "conv1/data"
op: "Placeholder"
}
node {
name: "conv1/conv1_w"
op: "Blob"
input: "conv1/XavierFill:0"
}
node {
name: "conv1/conv1_b"
op: "Blob"
input: "conv1/ConstantFill:0"
}
node {
name: "conv1/conv1"
op: "Blob"
input: "conv1/Conv:0"
}
node {
name: "conv1/conv1"
op: "Blob"
input: "conv1/Conv:0"
}
node {
name: "conv1/conv1_1"
op: "Blob"
input: "conv1/Relu:0"
}
node {
name: "conv1/conv1_1"
op: "Blob"
input: "conv1/Relu:0"
}
node {
name: "conv1/pool1"
op: "Blob"
input: "conv1/MaxPool:0"
}
node {
name: "conv1/pool1"
op: "Blob"
input: "conv1/MaxPool:0"
}
node {
name: "classifier/fc_w"
op: "Blob"
input: "classifier/XavierFill:0"
}
node {
name: "classifier/fc_b"
op: "Blob"
input: "classifier/ConstantFill:0"
}
node {
name: "classifier/fc"
op: "Blob"
input: "classifier/FC:0"
}
node {
name: "classifier/fc"
op: "Blob"
input: "classifier/FC:0"
}
node {
name: "classifier/pred"
op: "Blob"
input: "classifier/Softmax:0"
}
node {
name: "classifier/pred"
op: "Blob"
input: "classifier/Softmax:0"
}
node {
name: "classifier/label"
op: "Placeholder"
}
node {
name: "classifier/xent"
op: "Blob"
input: "classifier/LabelCrossEntropy:0"
}
node {
name: "classifier/xent"
op: "Blob"
input: "classifier/LabelCrossEntropy:0"
}
node {
name: "classifier/loss"
op: "Blob"
input: "classifier/AveragedLoss:0"
}
Loading

0 comments on commit 4861527

Please sign in to comment.