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

Julia v1 compatibility fix #255

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
86da734
is_apple depreciated
IanButterworth Nov 19, 2018
603b473
.
IanButterworth Nov 19, 2018
b419d43
attempts to update to 1.0.2
IanButterworth Nov 20, 2018
074e4a0
immutable to struct
IanButterworth Nov 20, 2018
e4848ea
1.0.2 updates
IanButterworth Nov 20, 2018
6862609
my attempts before femtocleaner
IanButterworth Nov 20, 2018
d2c36c1
Manual midway point
IanButterworth Nov 20, 2018
f01bd5d
runs in 1.0.2, but imagenet-classifier example causes segfault
IanButterworth Nov 20, 2018
5f64095
correcting erroneous Array typing edits
IanButterworth Nov 20, 2018
3977f4e
Corrected UUID and added repo addres to Project.toml
IanButterworth Nov 20, 2018
7a28264
initializing arrays with undef
IanButterworth Nov 20, 2018
96379fd
fix mysterious memento segfault via workaround
pluskid Nov 21, 2018
4c8514e
fixes for sum(., dims=...), broadcast .=, array init, ...
pluskid Nov 21, 2018
f355f98
fix BLAS calls, regex call, etc.
pluskid Nov 21, 2018
a4c2b75
fix unit tests for activation functions
pluskid Nov 21, 2018
bff6ffd
fix unit tests for regularizers and constraints
pluskid Nov 21, 2018
3a410e1
fix unittest: data transformer
pluskid Nov 21, 2018
a490312
fix unit test: power layer and pooling layer
pluskid Nov 21, 2018
5b72e5d
fix unit test: power layer, memory-data layer, lrn layer
pluskid Nov 21, 2018
f5fffa5
fix unit test hdf5, crop, inner-product
pluskid Nov 21, 2018
d9e27d1
fix unit test convolution and concat
pluskid Nov 21, 2018
ad2fb56
fix unit test: argmax, channel pooling
pluskid Nov 22, 2018
33814cb
all the rest of the layers
pluskid Nov 22, 2018
ef1f968
fix unit test for solvers
pluskid Nov 22, 2018
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
252 changes: 252 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "Pkg", "SHA", "Test"]
git-tree-sha1 = "9930c1a6cd49d9fcd7218df6be417e6ae4f1468a"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.2"

[[Blosc]]
deps = ["BinaryProvider", "CMakeWrapper", "Compat", "Libdl"]
git-tree-sha1 = "71fb23581e1f0b0ae7be8ccf0ebfb3600e23ca41"
uuid = "a74b3585-a348-5f62-a45c-50e91977d574"
version = "0.5.1"

[[BufferedStreams]]
deps = ["Compat", "Test"]
git-tree-sha1 = "5d55b9486590fdda5905c275bb21ce1f0754020f"
uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d"
version = "1.0.0"

[[CMake]]
deps = ["BinDeps", "Libdl", "Test"]
git-tree-sha1 = "74853a75c26a4a73ac391ee26ee29ebeb5583d9f"
uuid = "631607c0-34d2-5d66-819e-eb0f9aa2061a"
version = "1.1.0"

[[CMakeWrapper]]
deps = ["BinDeps", "CMake", "Libdl", "Parameters", "Test"]
git-tree-sha1 = "2b43d451639984e3571951cc687b8509b0a86c6d"
uuid = "d5fb7624-851a-54ee-a528-d3f3bac0b4a0"
version = "0.2.2"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "ec61a16eed883ad0cfa002d7489b3ce6d039bb9a"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "1.4.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[EzXML]]
deps = ["BinaryProvider", "Libdl", "Printf", "Test"]
git-tree-sha1 = "5623d1486bfaadd815f5c4ca501adda02b5337f1"
uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
version = "0.9.0"

[[FileIO]]
deps = ["Pkg", "Random", "Test"]
git-tree-sha1 = "884066c07188cc0f57d0ebdcab6c9a09cc734dbc"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.0.3"

[[HDF5]]
deps = ["BinDeps", "Blosc", "Distributed", "Homebrew", "Libdl", "LinearAlgebra", "Mmap", "Pkg", "Test", "WinRPM"]
git-tree-sha1 = "8c3bcdb44db436cd20106e2381e1c1ac96aa0ee3"
uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
version = "0.10.2"

[[HTTPClient]]
deps = ["Compat", "LibCURL"]
git-tree-sha1 = "161d5776ae8e585ac0b8c20fb81f17ab755b3671"
uuid = "0862f596-cf2d-50af-8ef4-f2be67dfa83f"
version = "0.2.1"

[[Homebrew]]
deps = ["BinDeps", "InteractiveUtils", "JSON", "Libdl", "Test", "Unicode"]
git-tree-sha1 = "5582ec74f735cf8d12e562a2e65c47f34063bd51"
uuid = "d9be37ee-ecc9-5288-90f1-b9ca67657a75"
version = "0.7.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JLD]]
deps = ["Compat", "FileIO", "HDF5", "LegacyStrings", "Profile", "Random"]
git-tree-sha1 = "95fd5d7f129918a75d0535aaaf5b8e235e6e0b0b"
uuid = "4138dd39-2aa7-5051-a626-17a0bb65d9c8"
version = "0.9.1"

[[JSON]]
deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"]
git-tree-sha1 = "fec8e4d433072731466d37ed0061b3ba7f70eeb9"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.19.0"

[[LegacyStrings]]
deps = ["Compat"]
git-tree-sha1 = "7cfb0bf378fab9ec57b393e3c56a419d6afab876"
uuid = "1b4a561d-cfcb-5daf-8433-43fcf8b4bea3"
version = "0.4.0"

[[LibCURL]]
deps = ["BinaryProvider", "Compat", "Libdl", "Printf"]
git-tree-sha1 = "6339c87cb76923a3cf947fcd213cbc364355c9c9"
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.4.1"

[[LibExpat]]
deps = ["Compat"]
git-tree-sha1 = "fde352ec13479e2f90e57939da2440fb78c5e388"
uuid = "522f3ed2-3f36-55e3-b6df-e94fee9b0c07"
version = "0.5.0"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Libz]]
deps = ["BufferedStreams", "Random", "Test"]
git-tree-sha1 = "d405194ffc0293c3519d4f7251ce51baac9cc871"
uuid = "2ec943e9-cfe8-584d-b93d-64dcb6d567b7"
version = "1.0.0"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Memento]]
deps = ["Compat", "JSON", "Nullables", "Syslogs", "TimeZones"]
git-tree-sha1 = "c4ade3575bcc2c180cfa14cf8b3b63eebca51629"
uuid = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
version = "0.10.0"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Mocking]]
deps = ["Compat", "Dates"]
git-tree-sha1 = "4bf69aaf823b119b034e091e16b18311aa191663"
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.5.7"

[[Nullables]]
deps = ["Compat"]
git-tree-sha1 = "ae1a63457e14554df2159b0b028f48536125092d"
uuid = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd"
version = "0.0.8"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.0.2"

[[Parameters]]
deps = ["Markdown", "OrderedCollections", "REPL", "Test"]
git-tree-sha1 = "40f540ec96e50c0b2b9efdb11b5e4d0c63f90923"
uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.10.1"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[Profile]]
deps = ["Printf"]
uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Syslogs]]
deps = ["Compat", "Nullables"]
git-tree-sha1 = "d3e512a044cc8873c741d88758f8e1888c7c47d3"
uuid = "cea106d9-e007-5e6c-ad93-58fe2094e9c4"
version = "0.2.0"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TimeZones]]
deps = ["Compat", "EzXML", "Mocking", "Nullables"]
git-tree-sha1 = "4a4ab113913e19ad62b67e6c5c056509eac00c19"
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
version = "0.8.2"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[WinRPM]]
deps = ["BinDeps", "Compat", "HTTPClient", "LibExpat", "Libdl", "Libz", "URIParser"]
git-tree-sha1 = "2a889d320f3b77d17c037f295859fe570133cfbf"
uuid = "c17dfb99-b4f7-5aad-8812-456da1ad7187"
version = "0.4.2"
12 changes: 12 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name = "Mocha"
uuid = "f17d6557-5fdd-57bf-a30c-27e301b4ff87"
repo = "https://github.com/pluskid/Mocha.jl.git"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JLD = "4138dd39-2aa7-5051-a626-17a0bb65d9c8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
5 changes: 0 additions & 5 deletions REQUIRE

This file was deleted.

6 changes: 3 additions & 3 deletions benchmarks/native-im2col/im2col-bm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using Benchmark
# | 2 | "im2col_c" | 0.00514862 | 6.19335 | 50 |
################################################################################

function im2col{T}(img::Array{T}, col::Array{T}, width::Int, height::Int, channels::Int, kernel::NTuple{2,Int}, pad::NTuple{2,Int}, stride::NTuple{2,Int})
function im2col(img::Array{T}, col::Array{T}, width::Int, height::Int, channels::Int, kernel::NTuple{2,Int}, pad::NTuple{2,Int}, stride::NTuple{2,Int}) where {T}
kernel_w, kernel_h = kernel
pad_w, pad_h = pad
stride_w, stride_h = stride
Expand Down Expand Up @@ -54,7 +54,7 @@ function im2col_native(img::Array{Float64}, col::Array{Float64}, width::Int, hei
pad_w, pad_h = pad
stride_w, stride_h = stride

ccall(func_handle, Void,
ccall(func_handle, Nothing,
(Ptr{Float64},Ptr{Float64}, Cint, Cint, Cint,
Cint, Cint, # kernel
Cint, Cint, # pad
Expand All @@ -74,7 +74,7 @@ img = rand(width, height, channels)

width_out = div(width + 2*pad[1]-kernel[1], stride[1]) + 1
height_out = div(height + 2*pad[2]-kernel[2], stride[2]) + 1
col_buffer = Array{Float64}(width_out, height_out, channels*prod(kernel))
col_buffer = Array{Float64}(undef,width_out, height_out, channels*prod(kernel))
col_buffer2 = zeros(size(col_buffer))

im2col_jl() = im2col(img, col_buffer, width, height, channels, kernel, pad, stride)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/native-pooling/pooling-bm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function pooling_native(input::Array, output::Array, mask::Array, kernel, pad, s
pooled_width = int(ceil(float(width +2*pad[1]-kernel[1]) / stride[1]))+1
pooled_height = int(ceil(float(height+2*pad[2]-kernel[2]) / stride[2]))+1

ccall(func_handle, Void, (Ptr{Float64}, Ptr{Float64}, Ptr{Csize_t}, Cint, Cint, Cint, Cint,
ccall(func_handle, Nothing, (Ptr{Float64}, Ptr{Float64}, Ptr{Csize_t}, Cint, Cint, Cint, Cint,
Cint, Cint, # pooled_width, pooled_height
Cint, Cint, Cint, Cint, Cint, Cint, # kernel, pad, stride
), input, output, mask, width, height, channels, num, pooled_width, pooled_height,
Expand Down
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ flags = ["-fPIC", "-Wall", "-O3", "-shared"]
libname = "libmochaext.so"
openmp = "-fopenmp"

@static is_apple() ? begin
@static Sys.isapple() ? begin
if !haskey(ENV, "MOCHA_FORCE_OMP")
println("OpenMP is currently not officially supported by OS X Clang compiler yet.")
println("(see http://clang-omp.github.io/ to install OpenMP clang extension, or")
Expand Down
9 changes: 9 additions & 0 deletions deps/build.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OpenMP is currently not officially supported by OS X Clang compiler yet.
(see http://clang-omp.github.io/ to install OpenMP clang extension, or
install gcc.

Disabling OpenMP. To force enable OpenMP, set MOCHA_FORCE_OMP environment
variable and set the CXX environment variable to the appropriate value
to invoke GCC's g++ frontend, such as g++-5

Running `g++ -fPIC -Wall -O3 -shared '' -o libmochaext.so im2col.cpp pooling.cpp`
2 changes: 1 addition & 1 deletion docs/dev-guide/layer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For example

.. code-block:: julia

type PoolingLayerState <: LayerState
struct PoolingLayerState <: LayerState
layer :: PoolingLayer
blobs :: Vector{Blob}
blobs_diff :: Vector{Blob}
Expand Down
Loading