See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
The official instructions on installing TensorFlow are here: https://www.tensorflow.org/install. If you want to install TensorFlow just using pip, you are running a supported Ubuntu LTS distribution, and you're happy to install the respective tested CUDA versions (which often are outdated), by all means go ahead. A good alternative may be to run a Docker image.
I am usually unhappy with installing what in effect are pre-built binaries. These binaries are often not compatible with the Ubuntu version I am running, the CUDA version that I have installed, and so on. Furthermore, they may be slower than binaries optimized for the target architecture, since certain instructions are not being used (e.g. AVX2, FMA).
So installing TensorFlow from source becomes a necessity. The official instructions on building TensorFlow from source are here: ht
const tf = require('@tensorflow/tfjs-node'); | |
const Jimp = require('jimp'); | |
// Directory path for model files (model.json, metadata.json, weights.bin) | |
// NOTE: It can be obtained from [Export Model] -> [Tensorflow.js] -> [Download my model] | |
// on https://teachablemachine.withgoogle.com/train/image | |
const MODEL_DIR_PATH = `${__dirname}`; | |
// Path for image file to predict class | |
const IMAGE_FILE_PATH = `${__dirname}/example.jpg`; |
//Update new system status | |
let updateResult = await System.updateOne({ 'systemId': SYSTEM_ID }, system[0], { upsert: true }).exec(); | |
console.log('Update Result:', updateResult); |
try { | |
//Update new system status | |
await System.updateOne({ 'systemId': SYSTEM_ID }, system[0], { upsert: true }).exec(); |
// Update student data with new data without the deleted course | |
try { | |
let ccompleteRes = await Students.updateOne({ 'studentId': studentId }, student[0], { upsert: true }).exec(); |
async function updateCompletedStudents(courseId, student, res) { | |
/* | |
* Substract -1 from @continuingStudents on system | |
*/ |
router.post('/complete-student-course', async (req, res) => { | |
let {studentId, courseId} = req.body; |
async function updateCompletedStudents(courseId, student, res) { | |
/* | |
* Substract -1 from @continuingStudents on system | |
*/ | |
try { | |
//Get current system data | |
let system = await System.find({ 'systemId': SYSTEM_ID }).exec(); |