Skip to content

Commit

Permalink
Merge pull request #335 from deephealthproject/develop
Browse files Browse the repository at this point in the history
Fix Windows + Update docs
  • Loading branch information
salvacarrion authored Mar 9, 2022
2 parents feffd06 + 19a2fba commit e839f80
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 28 deletions.
5 changes: 0 additions & 5 deletions docs/sphinx/source/bundle/initializers.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
Initializers
============

.. note::

Section in progress

Read this: https://github.com/deephealthproject/eddl/blob/master/docs/markdown/eddl_progress.md#initializers

GlorotNormal
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/model/onnx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Save and load ONNX models
Exporting to onnx
---------------------

.. doxygenfunction:: save_net_to_onnx_file(Net* net, string path)
.. doxygenfunction:: save_net_to_onnx_file(Net *net, string path, int seq_len = 0)

Example:

Expand Down
4 changes: 2 additions & 2 deletions examples/nn/2_cifar10/4_cifar_vgg16_bn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ int main(int argc, char **argv){
if (use_cpu) {
cs = CS_CPU();
} else {
//cs = CS_GPU({1}); // one GPU
cs = CS_GPU({1}); // one GPU
// cs = CS_GPU({1,1},100); // two GPU with weight sync every 100 batches
cs = CS_CPU();
// cs = CS_CPU();
// cs = CS_FPGA({1});
}

Expand Down
2 changes: 1 addition & 1 deletion formulas/conda/eddl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo "CPU_COUNT=$CPU_COUNT"
echo "#################################################"

# Build makefiles
mkdir build && cd build/ && cmake .. -DBUILD_TARGET=CUDNN \
mkdir build && cd build/ && cmake .. -DBUILD_TARGET=CPU \
-DBUILD_SUPERBUILD=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
Expand Down
26 changes: 13 additions & 13 deletions formulas/conda/eddl/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set name = "eddl-cudnn" %} # If this is a package for GPU, use: "eddl-gpu"
{% set version = "1.0.2a" %}
{% set sha256 = "70d6067d44cb547e218236e5bb72faf45f602a7b8214f869626ca47f241481a0" %}
{% set name = "eddl-cpu" %} # eddl-cpu, eddl-gpu, eddl-cudnn
{% set version = "1.1b" %}
{% set sha256 = "534ca4bd5e83236c164a26a058e08df971d28c0ae5b32674bec364ae0370843a" %}

package:
name: {{ name|lower }}
Expand All @@ -19,23 +19,23 @@ requirements:
build:
- {{ compiler('cxx') }}
host:
- cmake>=3.17.2
- eigen==3.3.7
- cmake=3.19
- eigen=3.3|3.4
- protobuf==3.11.4
- libprotobuf==3.11.4 # We need to avoid problems with paths (idk why)
- libprotobuf==3.11.4
- zlib==1.2.11
- openssl==1.1.1i
- graphviz # Build & Run (versions can be problematic)
- wget
- wget=1.20|1.16
- graphviz
run:
- cmake>=3.17.2
- eigen==3.3.7
- cmake=3.19
- eigen=3.3|3.4
- protobuf==3.11.4
- libprotobuf==3.11.4 # We need to avoid problems with paths (idk why)
- libprotobuf==3.11.4
- zlib==1.2.11
- openssl==1.1.1i
- graphviz # Build & Run (versions can be problematic)
- wget
- wget=1.20|1.16
- graphviz

test:
commands:
Expand Down
12 changes: 6 additions & 6 deletions src/layers/core/layer_dense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ void LDense::resize(int batch) {
}

void LDense::forward() {
input->reshape_({input->size / input->shape.back(), input->shape.back()});
output->reshape_({output->size / output->shape.back(), output->shape.back()});
input->reshape_({static_cast<int>(input->size / input->shape.back()), input->shape.back()});
output->reshape_({static_cast<int>(output->size / output->shape.back()), output->shape.back()});
Tensor::mult2D(input, 0, W, 0, output, 0);
if (use_bias) Tensor::sum2D_rowwise(output, bias, output);

Expand All @@ -73,11 +73,11 @@ void LDense::forward() {
}

void LDense::backward() {
input->reshape_({input->size / input->shape.back(), input->shape.back()});
parent[0]->delta->reshape_({input->size / input->shape.back(), input->shape.back()});
input->reshape_({static_cast<int>(input->size / input->shape.back()), input->shape.back()});
parent[0]->delta->reshape_({static_cast<int>(input->size / input->shape.back()), input->shape.back()});

output->reshape_({output->size / output->shape.back(), output->shape.back()});
delta->reshape_({output->size / output->shape.back(), output->shape.back()});
output->reshape_({static_cast<int>(output->size / output->shape.back()), output->shape.back()});
delta->reshape_({static_cast<int>(output->size / output->shape.back()), output->shape.back()});

//get gradients with provided delta
if (trainable) {
Expand Down

0 comments on commit e839f80

Please sign in to comment.