This file contains 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
''' | |
- For generator: (creates set of fake images in NCHW format ; | |
2nd channel being label encodings) | |
- Generate random integers between 0 and 9 (of 1 X batch_size shape). | |
These would be our labels for fake images | |
- Convert these into one-hot encoding : --> (batch_size, 10 ) | |
- Broadcast to (batch_size X 10 X 10 shape) --> (batch_size, 10, 10) | |
- Add another dimension for channel: --> (batch_size, 1, 10, 10) | |
- Generate a 10X10 noise matrix using mx.random.normal() --> (batch_size, 1, 10, 10) | |
- Concatenate the label encodings with noise: --> (batch_size, 2, 10, 10) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
import socket | |
HOST = 'localhost' # The server's hostname or IP address | |
PORT = 64532 # The port used by the server | |
use_tcp = False | |
if not use_tcp: | |
################# UDP CLIENT #################### |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
import os | |
import numpy as np | |
import cv2 | |
from scipy.misc import imsave | |
DIR = './' | |
LEFT=190 | |
RIGHT=1246 | |
TOP=0 | |
BOTTOM=590 |