Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log_audio, TBAudio, tests, examples #27

Merged
merged 46 commits into from
May 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1a5e250
Merge pull request #1 from PhilipVinc/master
Mar 26, 2019
d3f50c6
Merge pull request #2 from PhilipVinc/master
Apr 17, 2019
d5fefa1
Merge pull request #5 from PhilipVinc/master
May 8, 2019
f9992b6
add matrix and list support to log_text
May 14, 2019
cf7c911
reverting test_TBLogger.jl
May 14, 2019
9ef5ff4
Merge pull request #7 from PhilipVinc/master
May 15, 2019
c3c8a6f
add support for 1-D images in `log_image`
May 15, 2019
8e276e1
add ImageFormat explanation
May 15, 2019
0e6f2b3
add seperate function for image objects
May 16, 2019
b53a4a9
add more formats
May 16, 2019
447c484
add preprocess function for image objects for automatic dispatch
May 16, 2019
8282a13
add TBImage, TBImages wrapper
May 16, 2019
c24dd63
add tests. more required. more will come
May 16, 2019
2884423
Merge pull request #8 from shashikdm/updateimage
May 16, 2019
c3773cc
minor bug fix
May 16, 2019
92c7d08
Merge pull request #9 from shashikdm/updateimage
May 16, 2019
8b6170d
refactoring
May 16, 2019
a3c90a5
add support for 3-d images such as mri
May 16, 2019
598aec6
bug fixes
May 17, 2019
dffb97f
add more tests
May 17, 2019
e048ddb
minor bug fix
May 17, 2019
544415b
add examples folder
May 17, 2019
71d79ee
Merge pull request #10 from shashikdm/examples
May 17, 2019
15a6250
syntax revision
May 17, 2019
92a1c10
Merge branch 'master' of github.com:shashikdm/TensorBoardLogger.jl
May 17, 2019
e4af898
change if else to function dispatch `image_summary`
May 18, 2019
7a4bef4
major revision `log_image` smart use of ImageFormats
May 18, 2019
ab7dda3
change throw message
May 18, 2019
8243d18
change dict to ternary. minor revision
May 18, 2019
773ff7a
add LogAudio.jl with dep WAV.jl
May 19, 2019
4c14f46
add test for `log_audio`
May 20, 2019
9f17ec2
add `TBAudios` and `TBAudio` and test
May 20, 2019
821b804
bugfix `log_text`
May 20, 2019
0e80fa5
add examples `Audios.jl` and `Texts.jl`
May 20, 2019
103d1dc
Merge branch 'master' into master
PhilipVinc May 20, 2019
13180d1
Merge pull request #12 from shashikdm/master
May 21, 2019
60eb6f5
change SummaryCollection construction `log_audio`
May 21, 2019
ea81489
Merge pull request #11 from shashikdm/logaudio
May 21, 2019
ba3c284
Merge branch 'master' into master
May 21, 2019
d6d3285
update
May 21, 2019
b4a92dd
Merge branch 'master' of github.com:shashikdm/TensorBoardLogger.jl
May 21, 2019
5e315b9
change docstring
May 21, 2019
3c0993f
rm test data
May 21, 2019
700be47
chane SummaryCollection
May 21, 2019
f86a646
Merge branch 'master' into master
May 22, 2019
16d20e3
rm WAV dependency
May 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add examples folder
shashikdm committed May 17, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 544415bb14f2696af1c9ab420c4136eef8af2f08
28 changes: 28 additions & 0 deletions examples/Histograms.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using TensorBoardLogger #import the TensorBoardLogger package
using Logging #import Logging package

logger = TBLogger("histogramlogs", tb_append) #create tensorboard logger

################log histogram example:################
#using logger interface
with_logger(logger) do
for i in 1:100
x0 = 0.5+i/30; s0 = 0.5/(i/20);
edges = collect(-5:0.1:5)
centers = collect(edges[1:end-1] .+0.05)
histvals = [exp(-((c-x0)/s0)^2) for c = centers]
data_tuple = (edges, histvals)
@info "histogram/loggerinterface" autobin=rand(10).+0.1*i manualbin=data_tuple
end
end

#using explicit function interface
for i in 1:100
x0 = 0.5+i/30; s0 = 0.5/(i/20);
edges = collect(-5:0.1:5)
centers = collect(edges[1:end-1] .+0.05)
histvals = [exp(-((c-x0)/s0)^2) for c = centers]
data_tuple = (edges, histvals)
log_histogram(logger, "histogram/explicitinterface/autobin", rand(10).+0.1*i, step = i) #automatic bins
log_histogram(logger, "histogram/explicitinterface/manualbin", data_tuple, step = i) #manual bins
end
38 changes: 38 additions & 0 deletions examples/Images.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using TensorBoardLogger #import the TensorBoardLogger package
using Logging #import Logging package
using TestImages
using Flux: Data
using Random
logger = TBLogger("imagelogs", tb_append) #create tensorboard logger

################log images example: mri################
mri = testimage("mri")

#using logger interface
with_logger(logger) do
@info "image/mri/loggerinterface" mri
end
#using explicit function interface
log_image(logger, "image/mri/explicitinterface", mri, step = 0)


################log images example: MNIST data################
images = shuffle(Data.MNIST.images())[1:5]

#using logger interface
with_logger(logger) do
@info "image/mnist/loggerinterface" images = TBImages(images, HW)
end
#using explicit function interface
log_images(logger, "image/mnist/explicitinterface", images, step = 0)


################log images example: random arrays################
noise = rand(16, 16, 3, 4) #Format is HWCN

#using logger interface
with_logger(logger) do
@info "image/noise/loggerinterface" random = TBImage(noise, HWCN)
end
#using explicit function interface
log_image(logger, "image/noise/explicitinterface", noise, HWCN, step = 0)
25 changes: 25 additions & 0 deletions examples/Scalars.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using TensorBoardLogger #import the TensorBoardLogger package
using Logging #import Logging package

logger = TBLogger("scalarlogs", tb_append) #create tensorboard logger

################log scalars example: y = x²################
#using logger interface
with_logger(logger) do
for x in 1:20
@info "scalar/loggerinterface" y = x*x
end
end
#using explicit function interface
for x in 1:20
log_value(logger, "scalar/explicitinterface", x*x, step = x)
end


################log scalar example: y = x-xi################
with_logger(logger) do
for x in 1:10
z = x-x*im
@info "scalar/complex" y = z
end
end