I hereby claim:
- I am alexrhogue on github.
- I am alexrhogue (https://keybase.io/alexrhogue) on keybase.
- I have a public key ASDxTxa_z4ONqySIkAuW2MYoBhe26KCtbXrIweZ6qKvgqwo
To claim this, I am signing this object:
import tf from '@tensorflow/tfjs'; | |
import fs from 'fs'; | |
const training = JSON.parse(fs.readFileSync('./data/training.json', { encoding: 'utf8'})); | |
const raw_data = training.data | |
const inputs = raw_data.map(d => d[0].reduce((p, c) => [...p, ...c], [])) | |
const labels = raw_data.map(d => d[1].length === 0 ? [-1,-1,-1] : d[1]); | |
const inputTensor = tf.tensor2d(inputs, [inputs.length, 48]); |
const NUM_CARD_PROP_OPTIONS = 3; | |
const NUM_CARD_PROPS = 4 | |
const BOARD_SIZE = 12; | |
const SET_SIZE = 3; | |
export const getCardProp = () => Math.floor(Math.random() * NUM_CARD_PROP_OPTIONS) | |
export const getCard = () => new Array(NUM_CARD_PROPS).fill().map(getCardProp) | |
export const getBoard = () => new Array(BOARD_SIZE).fill().map(getCard) | |
export const combinations = (arr = [], len) => { |
With Fancy |
Did this work!? |
I hereby claim:
To claim this, I am signing this object: