Skip to content

Commit

Permalink
Merge pull request #209 from AdarshSantoria/master
Browse files Browse the repository at this point in the history
Minor Syntax Error
  • Loading branch information
rcurtin committed Jun 16, 2023
2 parents f88e690 + fd3ca31 commit 01c4616
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
12 changes: 0 additions & 12 deletions .ci/linux-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ steps:
for f in */Makefile; do
dir=`dirname $f`;
# TODO: this takes too long right now.
if [ "$dir" == "mnist_cnn" ];
then
continue;
fi
# TODO: the dataset cannot be loaded.
if [ "$dir" == "mnist_vae_cnn" ];
then
Expand All @@ -96,12 +90,6 @@ steps:
continue;
fi
# TODO: necessary layers have not yet been adapted
if [ "$dir" == "mnist_batch_norm" ];
then
continue;
fi
cd $dir;
target_name=`grep 'TARGET := ' Makefile | awk -F ' := ' '{ print $2 }'`;
echo "Make target $target_name in directory $dir.";
Expand Down
12 changes: 0 additions & 12 deletions .ci/macos-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ steps:
# Remove the -fopenmp flag from the Makefile.
sed -i '' 's/ -fopenmp//' $f;
# TODO: this takes too long right now.
if [ "$dir" == "mnist_cnn" ];
then
continue;
fi
# TODO: the dataset cannot be loaded.
if [ "$dir" == "mnist_vae_cnn" ];
then
Expand All @@ -102,12 +96,6 @@ steps:
continue;
fi
# TODO: necessary layers have not yet been adapted
if [ "$dir" == "mnist_batch_norm" ];
then
continue;
fi
cd $dir;
target_name=`grep 'TARGET := ' Makefile | awk -F ' := ' '{ print $2 }'`;
echo "Make target $target_name in directory $dir.";
Expand Down
8 changes: 1 addition & 7 deletions mnist_batch_norm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ LIBS := $(addprefix -l,$(LIBS_NAME))
CLEAN_LIST := $(TARGET) $(OBJS)

# default rule
default: fail

fail:
@echo "NOTE: this example does not currently build!"
@echo "The BatchNorm and PReLU layers have not yet been adapted to the "
@echo "mlpack 4 layer style. See"
@echo "https://github.com/mlpack/mlpack/pull/2777 for more information."
default: all

$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $(TARGET) $(LDFLAGS) $(LIBS)
Expand Down
4 changes: 2 additions & 2 deletions mnist_batch_norm/mnist_batch_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ int main()
model.Add<PReLU>();
// BatchNorm layer applied after PReLU activation as it gives
// better results practically.
model.Add<BatchNorm>(H1);
model.Add<BatchNorm>();
// Intermediate layer between PReLU activation layers.
model.Add<Linear>(H2);
// The second PReLU layer.
model.Add<PReLU>();
// Second BatchNorm layer
model.Add<BatchNorm>(H2);
model.Add<BatchNorm>();
// Intermediate layer.
model.Add<Linear>(10);
// LogSoftMax layer is used together with NegativeLogLikelihood for mapping
Expand Down

0 comments on commit 01c4616

Please sign in to comment.