This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------------------------------------- | |
// ---------------------------[ Helpers start ]--------------------------------------------- | |
// ---------------------------------------------------------------------------------------- | |
/** | |
* USAGE: `img = capture(i.toString())` where `i` is INT | |
* Captures a frame from the webcam and normalizes it between -1 and 1. | |
* Returns a batched image (1-element batch) of shape [1, w, h, c]. | |
*/ | |
async function getImage(imgId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modify the pre-trained mobilenet. | |
// freezes layers to train only the last couple of layers | |
async function getModifiedMobilenet() | |
{ | |
// freezes mobilenet layers to make them untrainable | |
// just keeps final layers trainable with argument trainableLayers | |
async function freezeModelLayers(trainableLayers,mobilenetModified) | |
{ | |
for (const layer of mobilenetModified.layers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FROM alpine:latest | |
#RUN apk add --no-cache --update python3.6 | |
#WORKDIR /app | |
#COPY . /app | |
#RUN pip3 install -r requirements.txt | |
#EXPOSE 4000 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.