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
# f: encoder: backbone + proj mlp | |
# tau: temperature | |
# minibatch x: [n, m, 3, h, w] | |
# n captions, m images per caption | |
# As per paper: | |
# n*m = 8192, and m=6 then n=1366 | |
def H(p, q): # cross-entropy | |
return - (p * log(q)).sum(1).mean() |
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
sepal_length | sepal_width | petal_length | petal_width | species | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | 0 | |
4.9 | 3 | 1.4 | 0.2 | 0 | |
4.7 | 3.2 | 1.3 | 0.2 | 0 | |
4.6 | 3.1 | 1.5 | 0.2 | 0 | |
5 | 3.6 | 1.4 | 0.2 | 0 | |
5.4 | 3.9 | 1.7 | 0.4 | 0 | |
4.6 | 3.4 | 1.4 | 0.3 | 0 | |
5 | 3.4 | 1.5 | 0.2 | 0 | |
4.4 | 2.9 | 1.4 | 0.2 | 0 |
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
import cv2 | |
import numpy as np | |
firstImage = cv2.imread('data/images/musk.jpg',1) | |
secondImage = cv2.imread('data/images/beard.png',-1) | |
secondImageResize = cv2.resize(secondImage,(300,200),interpolation=cv2.INTER_LINEAR) | |
alphaImageMask = secondImageResize[:,:,3] |
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
7f45 4c46 0201 0100 0000 0000 0000 0000 | |
0100 3e00 0100 0000 0000 0000 0000 0000 | |
0000 0000 0000 0000 d002 0000 0000 0000 | |
0000 0000 4000 0000 0000 4000 0d00 0c00 | |
5548 89e5 488d 3d00 0000 00b8 0000 0000 | |
e800 0000 00b8 0000 0000 5dc3 4865 6c6c | |
6f20 576f 726c 6400 0047 4343 3a20 2855 | |
6275 6e74 7520 372e 332e 302d 3237 7562 | |
756e 7475 317e 3138 2e30 3429 2037 2e33 | |
2e30 0000 0000 0000 1400 0000 0000 0000 |
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
.file "hello.c" | |
.text | |
.section .rodata | |
.LC0: | |
.string "Hello World" | |
.text | |
.globl main | |
.type main, @function | |
main: | |
.LFB0: |
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
# 1 "hello.c" | |
# 1 "<built-in>" | |
# 1 "<command-line>" | |
# 31 "<command-line>" | |
# 1 "/usr/include/stdc-predef.h" 1 3 4 | |
# 32 "<command-line>" 2 | |
# 1 "hello.c" | |
# 1 "/usr/include/stdio.h" 1 3 4 | |
# 27 "/usr/include/stdio.h" 3 4 | |
# 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 |
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
#include<stdio.h> | |
int main(){ | |
printf("Hello World"); | |
return 0; | |
} |
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
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
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
<Html> | |
<Head> | |
<Title>Pyhton Notes</Title> | |
</Head> | |
<Body> | |
<H3 style="color:WHITE;background: TOMATO; text-align: center;">FILES</H3> | |
<div style="width:auto; height:auto; background: rgba(50, 20, 158, 0.8); color:WHITE; box-shadow: 0px 0px 15px BLACK;"> | |
<pre style="font-weight: bold; font-size: 15px;"> |
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
<Html> | |
<Head> | |
<Title>Pyhton Notes</Title> | |
</Head> | |
<Body> | |
<H3 style="color:WHITE;background: TOMATO; text-align: center;">FILES</H3> | |
<div style="width:auto; height:auto; background: rgba(50, 20, 158, 0.8); color:WHITE; box-shadow: 0px 0px 15px BLACK;"> | |
<pre style="font-weight: bold; font-size: 15px;"> |
NewerOlder