Treffer: Neural Network in Java using DeepLearning4J framework vs. Python using TensorFlow framework: Trade-offs Between Execution Speed, Resource Consumption, and Developer Efficiency : A Comparative Benchmark and User Evaluation Study ; Neuronnät i Java (med DeepLearning4J) vs. Python (med TensorFlow): Avvägningar mellan exekveringshastighet, resursförbrukning och utvecklareffektivitet : En Jämförande Prestandamätning och Användarutvärdering

Title:
Neural Network in Java using DeepLearning4J framework vs. Python using TensorFlow framework: Trade-offs Between Execution Speed, Resource Consumption, and Developer Efficiency : A Comparative Benchmark and User Evaluation Study ; Neuronnät i Java (med DeepLearning4J) vs. Python (med TensorFlow): Avvägningar mellan exekveringshastighet, resursförbrukning och utvecklareffektivitet : En Jämförande Prestandamätning och Användarutvärdering
Publisher Information:
KTH, Skolan för elektroteknik och datavetenskap (EECS)
Publication Year:
2025
Collection:
Royal Inst. of Technology, Stockholm (KTH): Publication Database DiVA
Document Type:
Dissertation bachelor thesis
File Description:
application/pdf
Language:
English
Relation:
TRITA-EECS-EX; 2025:467
Rights:
info:eu-repo/semantics/openAccess
Accession Number:
edsbas.B66AE7BA
Database:
BASE

Weitere Informationen

Programmers face challenges when choosing between Java (using DeepLearning4J) and Python (using TensorFlow) for neural network deployment, particularly when performance, resource utilization, and developer efficiency must be balanced. This study aims to provide data-driven guidance to support language selection for AI where performance, scalability, or system integration are critical. To investigate this, identical neural networks ranging from easy to hard complexity, including convolutional architectures were implemented in both languages using the MNIST dataset. Performance metrics such as training time, inference latency, and memory consumption were collected under controlled conditions. Developer-oriented metrics including code complexity and implementation effort were also measured. The results indicate that TensorFlow, leveraging GPU acceleration, offers significantly faster training speeds, particularly for more complex models. In contrast, DeepLearning4J on CPU achieved lower inference latency than TensorFlow for the dense models, whereas GPU-accelerated TensorFlow delivered sub-millisecond calls on the convolutional neural networks (CNN). While Python implementations required fewer lines of code and similar levels of cyclomatic complexity, both frameworks produced models with comparable accuracy, showing a variance of no more than 0.5 percent, but with differences in training time and memory usage. The training time showed that TensorFlow outperformed DeepLearning4J in most neural network complexities, and that DeepLearning4J outperformed TensorFlow by using less memory. These findings suggest that TensorFlow is well suited for rapid prototyping with GPU support, whereas DeepLearning4J may be more appropriate for resource efficient, CPU-based deployment in enterprise environments. ; Programmerare ställs inför utmaningar när de ska välja mellan Java (med DeepLearning4J) och Python (med TensorFlow) för utveckling av neurala nätverk, särskilt när prestanda, resursutnyttjande och utvecklingseffektivitet ...