k, persistent, persist_from, learning_rate, momentum, l1, l2,
method, seed, log_every, plot):
Train an RBM
train_set = np.loadtxt(train_path)
target_psi = np.loadtxt(target_path)
num_hidden = train_set.shape[-1] if num_hidden is None else num_hidden
After Change
Train an RBM
// train_set = np.loadtxt(train_path)
// target_psi = np.loadtxt(target_path) if target_path is not None else None
with gzip.open(train_path) as f:
train_set = pickle.load(f, encoding="bytes")
num_hidden = train_set.shape[-1] if num_hidden is None else num_hidden
rbm = RBM(num_visible=train_set.shape[-1],
num_hidden=num_hidden,