Skip to content

Commit

Permalink
travis again!
Browse files Browse the repository at this point in the history
  • Loading branch information
zenna committed Aug 5, 2018
1 parent d8dded6 commit 62ada26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -19,7 +19,6 @@ script:
- julia -e 'Pkg.build("Tensorboard")'
- julia -e 'Pkg.update()'
- julia -e 'Pkg.add("MLDatasets")'
- julia -e 'Pkg.add("Tests")'
- julia -e 'Pkg.test("Tensorboard", coverage=true)'
matrix:
fast_finish: true
Expand Down
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -9,7 +9,7 @@ Currently it is implemented as a wrapper over the Python library tensorboardX.

## Limitations

`add_image!` does not work, since it expects a PyTorch Tensor and not a numpy array, PRs are welcome!
`add_embedding!` does not work, since it expects a PyTorch Tensor and not a numpy array, PRs are welcome!

## Installation

Expand Down Expand Up @@ -59,7 +59,7 @@ for n_iter = 1:100
dummy_img = rand(3, 64, 64)
if n_iter % 10 == 0
# x = vutils.make_grid(dummy_img, normalize=true, scale_each=true)
# add_image!(writer, "Image", dummy_img, n_iter)
add_image!(writer, "Image", dummy_img, n_iter)
dummy_audio = [cos(freqs[div(n_iter, 10)] * pi * i / sample_rate) for i = 1:sample_rate * 2]

add_audio!(writer, "myAudio", dummy_audio, n_iter, sample_rate=sample_rate)
Expand All @@ -80,7 +80,9 @@ images = float(permutedims(dataset[:, :, 1:100], (3, 1, 2)))
images = reshape(images, (100, 1, 28, 28))
label = labels[1:100]
features = reshape(images, (100, 784))
add_embedding!(writer, features, metadata=label, label_img=images)

# Not yet supported
# add_embedding!(writer, features, metadata=label, label_img=images)

# export scalar data to JSON for external processing
export_scalars_to_json(writer, "./all_scalars.json")
Expand Down
12 changes: 7 additions & 5 deletions test/simulate.jl
Expand Up @@ -23,7 +23,7 @@ for n_iter = 1:100
dummy_img = rand(3, 64, 64)
if n_iter % 10 == 0
# x = vutils.make_grid(dummy_img, normalize=true, scale_each=true)
# add_image!(writer, "Image", dummy_img, n_iter)
add_image!(writer, "Image", dummy_img, n_iter)
dummy_audio = [cos(freqs[div(n_iter, 10)] * pi * i / sample_rate) for i = 1:sample_rate * 2]

add_audio!(writer, "myAudio", dummy_audio, n_iter, sample_rate=sample_rate)
Expand All @@ -44,8 +44,10 @@ images = float(permutedims(dataset[:, :, 1:100], (3, 1, 2)))
images = reshape(images, (100, 1, 28, 28))
label = labels[1:100]
features = reshape(images, (100, 784))
add_embedding!(writer, features, metadata=label, label_img=images)

# # export scalar data to JSON for external processing
# writer.export_scalars_to_json("./all_scalars.json")
# close(writer)
# Not yet supported
# add_embedding!(writer, features, metadata=label, label_img=images)

# export scalar data to JSON for external processing
export_scalars_to_json(writer, "./all_scalars.json")
close(writer)

0 comments on commit 62ada26

Please sign in to comment.