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
# Scanner i2c en MicroPython | MicroPython i2c scanner | |
# Renvoi l'adresse en decimal et hexa de chaque device connecte sur le bus i2c | |
# Return decimal and hexa adress of each i2c device | |
# https://projetsdiy.fr - https://diyprojects.io (dec. 2017) | |
import machine | |
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4)) | |
print('Scan i2c bus...') | |
devices = i2c.scan() |
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 tensorflow as tf | |
from tensorflow.keras.layers import Layer | |
class ROIPoolingLayer(Layer): | |
""" Implements Region Of Interest Max Pooling | |
for channel-first images and relative bounding box coordinates | |
# Constructor parameters | |
pooled_height, pooled_width (int) -- | |
specify height and width of layer outputs |