version bump
This commit is contained in:
parent
44bc283f4f
commit
35a2297ab2
6 changed files with 16 additions and 9 deletions
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
using namespace tp;
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
void loadImage(Buffer<halnf>& output, const char* name) {
|
||||
int x, y, channels_in_file;
|
||||
unsigned char* loadedImage = stbi_load(name, &x, &y, &channels_in_file, 4);
|
||||
|
|
@ -28,7 +30,9 @@ void loadImage(Buffer<halnf>& output, const char* name) {
|
|||
void loadNN(FCNN& nn) {
|
||||
ArchiverLocalConnection<true> archiver;
|
||||
|
||||
archiver.connection.connect(LocalConnection::Location("NumRec.wb"), LocalConnection::Type(true));
|
||||
if (std::filesystem::exists(std::filesystem::path("NumRec.wb"))) {
|
||||
archiver.connection.connect(LocalConnection::Location("NumRec.wb"), LocalConnection::Type(true));
|
||||
}
|
||||
|
||||
if (archiver.connection.getConnectionStatus().isOpened()) {
|
||||
archiver % nn;
|
||||
|
|
@ -56,7 +60,7 @@ void executeCmd(const char* imageName) {
|
|||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
const char* imageName = "digit.png";
|
||||
const char* imageName = "tmp2.png";
|
||||
|
||||
if (argc == 2) {
|
||||
imageName = argv[1];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include <filesystem>
|
||||
#include "FCNN.hpp"
|
||||
#include "LocalConnection.hpp"
|
||||
|
||||
|
|
@ -71,7 +72,9 @@ struct NumberRec {
|
|||
{
|
||||
ArchiverLocalConnection<true> archiver;
|
||||
|
||||
archiver.connection.connect(LocalConnection::Location("NumRec.wb"), LocalConnection::Type(true));
|
||||
if (std::filesystem::exists(std::filesystem::path("NumRec.wb"))) {
|
||||
archiver.connection.connect(LocalConnection::Location("NumRec.wb"), LocalConnection::Type(true));
|
||||
}
|
||||
|
||||
if (archiver.connection.getConnectionStatus().isOpened()) {
|
||||
archiver % nn;
|
||||
|
|
@ -215,7 +218,7 @@ int main() {
|
|||
|
||||
auto batchSize = trainRange.idxDiff() / numBatches;
|
||||
|
||||
for (auto epoch : IterRange(1)) {
|
||||
for (auto epoch : IterRange(10)) {
|
||||
printf("Epoch %i\n", epoch.index());
|
||||
|
||||
for (auto batchIdx : IterRange(trainRange.idxDiff() / batchSize)) {
|
||||
|
|
@ -241,5 +244,5 @@ int main() {
|
|||
// app.displayImage(i);
|
||||
}
|
||||
|
||||
printf("\n\nIncorrect - %i out of %i (%f)\n\n", errors, testRange.idxDiff(), (halnf) errors / (halnf) testRange.idxDiff());
|
||||
printf("\n\nIncorrect - %i out of %i error percentage (%f)\n\n", errors, testRange.idxDiff(), (halnf) errors / (halnf) testRange.idxDiff());
|
||||
}
|
||||
2
Externals/lalr
vendored
2
Externals/lalr
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 6d16a6bb60490a2ee4e86f689c86e647b300c7fb
|
||||
Subproject commit 498612239713a6dbbf9f26b8e412e985538a0650
|
||||
|
|
@ -15,7 +15,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC Graphics Connection Widgets)
|
|||
target_link_libraries(${PROJECT_NAME} PUBLIC ${BINDINGS_LIBS})
|
||||
|
||||
file(COPY "library" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}")
|
||||
file(COPY "applications/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/")
|
||||
file(COPY "applications/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/rsc/")
|
||||
|
||||
### -------------------------- Applications -------------------------- ###
|
||||
add_executable(libView ./applications/Entry.cpp)
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ add_executable(Sketch3DApp ./applications/Entry.cpp)
|
|||
target_link_libraries(Sketch3DApp ${PROJECT_NAME})
|
||||
|
||||
file(COPY "rsc" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/")
|
||||
file(COPY "applications/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/")
|
||||
file(COPY "applications/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/rsc")
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ add_executable(WidgetsExample examples/Example.cpp)
|
|||
target_link_libraries(WidgetsExample ${PROJECT_NAME} ${GLEW_LIB})
|
||||
target_include_directories(WidgetsExample PUBLIC ../Externals/glfw/include ${GLEW_INCLUDE_DIR})
|
||||
|
||||
file(COPY "examples/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/")
|
||||
file(COPY "examples/Font.ttf" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/rsc")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue