import tensorflow as tf
import numpy as np
from pathlib import Path
g = tf.random.Generator.from_seed(123456)
commonSize = 2
for aRank in range(2,7):
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 scala.collection.JavaConverters._ | |
Nd4j.getRandom().setSeed(1234L) | |
val wInit = Nd4j.rand(5, 7) | |
val testInit = Nd4j.rand(7, 3, 4, 5) | |
// Not permuted. Works | |
val sd1 = SameDiff.create() | |
var w1 = sd1.`var`("w", wInit) | |
val testInputNotPermuted = sd1.constant("test_input_not", testInit) |