import sys
sys.path.append('..')
from optimizer import SGD
from trainer import trainer
import numpy as np
from two_layer_net import TwoLayerNet
max_epoch=4395
batch_size=500
hidden_size=2000
learning_rate = 1.0
x,t=np.genfromtxt(fname="1ghdenn.csv", encoding='UTF-8', dtype=None, delimiter='\t')
model=TwoLayerNet(input_size=4395, hidden_size=hidden_size, output_size=24)
optimizer=SGD(lr=learning_rate)
trainer=Trainer(model, optimizer)
trainer.fit(x,t,max_epoch,batch_size,val_interval=10)
trainer.plot()
If you type this code, you will get a title-like error.
Please let me know how to solve it.
"unpack" means "unpacked sequence", and this error is "np.genfromtxt()
function return value is x,t=np.genfromtxt()
more than 2 unpacked variables.
np.genfromtxt()
The return value of the function is NumPyarray, so I think it is common to take it as an array and then process it.
data=np.genfromtxt
© 2025 OneMinuteCode. All rights reserved.