Commit a836fde0 authored by Joseph Redmon's avatar Joseph Redmon
Browse files

reset for class

parents
*.o
*.a
*.so
*.dSYM
*.csv
*.out
*.pyc
.fuse*
libuwnet*
mnist*
cifar*
uwnet
.jekyll-cache
# OS Generated #
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
*.swp
OPENCV=0
OPENMP=0
DEBUG=0
OBJ=main.o image.o args.o test.o matrix.o list.o data.o classifier.o net.o connected_layer.o activation_layer.o convolutional_layer.o maxpool_layer.o batchnorm_layer.o
EXOBJ=test.o
VPATH=./src/:./
EXEC=uwnet
SLIB=lib${EXEC}.so
ALIB=lib${EXEC}.a
OBJDIR=./obj/
CC=gcc
AR=ar
ARFLAGS=rcs
OPTS=-Ofast
LDFLAGS= -lm -pthread
COMMON= -Iinclude/ -Isrc/
CFLAGS=-Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC
ifeq ($(OPENMP), 1)
CFLAGS+= -fopenmp
endif
ifeq ($(DEBUG), 1)
OPTS=-O0 -g
COMMON= -Iinclude/ -Isrc/
endif
CFLAGS+=$(OPTS)
ifeq ($(OPENCV), 1)
COMMON+= -DOPENCV
CFLAGS+= -DOPENCV
LDFLAGS+= `pkg-config --libs opencv`
COMMON+= `pkg-config --cflags opencv`
endif
EXOBJS = $(addprefix $(OBJDIR), $(EXOBJ))
OBJS = $(addprefix $(OBJDIR), $(OBJ))
DEPS = $(wildcard src/*.h) Makefile
all: obj $(SLIB) $(ALIB) $(EXEC)
$(EXEC): $(EXOBJS) $(OBJS)
$(CC) $(COMMON) $(CFLAGS) $^ -o $@ $(LDFLAGS)
$(ALIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $^
$(SLIB): $(OBJS)
$(CC) $(CFLAGS) -shared $^ -o $@ $(LDFLAGS)
$(OBJDIR)%.o: %.c $(DEPS)
$(CC) $(COMMON) $(CFLAGS) -c $< -o $@
obj:
mkdir -p obj
.PHONY: clean
clean:
rm -rf $(OBJS) $(SLIB) $(ALIB) $(EXEC) $(EXOBJS) $(OBJDIR)/*
# UW Net #
This is a work in progress.....
but I'm working on it!
- [Homework 0](./hw0.md)
- [Homework 1](./hw1.md)
- [Homework 2](./hw2.md)
rm -rf submit/
mkdir -p submit
prepare () {
if [[ $(git diff origin -- $1 | wc -c) -eq 0 ]]; then
echo "WARNING: $1 is unchanged according to git."
fi
cp $1 submit/
}
echo "Creating tarball..."
prepare src/matrix.c
prepare src/activation_layer.c
prepare src/connected_layer.c
prepare tryhw0.py
prepare hw0.ipynb
tar cvzf hw0.tar.gz submit
rm -rf submit/
echo "Done. Please upload hw0.tar.gz to Canvas."
rm -rf submit/
mkdir -p submit
prepare () {
if [[ $(git diff origin -- $1 | wc -c) -eq 0 ]]; then
echo "WARNING: $1 is unchanged according to git."
fi
cp $1 submit/
}
echo "Creating tarball..."
prepare src/convolutional_layer.c
prepare src/maxpool_layer.c
prepare tryhw1.py
prepare hw1.ipynb
tar cvzf hw1.tar.gz submit
rm -rf submit/
echo "Done. Please upload hw1.tar.gz to Canvas."
rm -rf submit/
mkdir -p submit
prepare () {
if [[ $(git diff origin -- $1 | wc -c) -eq 0 ]]; then
echo "WARNING: $1 is unchanged according to git."
fi
cp $1 submit/
}
echo "Creating tarball..."
prepare src/batchnorm_layer.c
prepare tryhw2.py
prepare hw2.ipynb
tar cvzf hw2.tar.gz submit
rm -rf submit/
echo "Done. Please upload hw2.tar.gz to Canvas."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment