PyTorch-Tutorial icon indicating copy to clipboard operation
PyTorch-Tutorial copied to clipboard

Build your neural network easy and fast, 莫烦Python中文教学

Results 31 PyTorch-Tutorial issues
Sort by recently updated
recently updated
newest added

如题。请问在训练过程中,batch_size一般为1吗?因为不同的样本似乎有不同的动作选择次数,一次性多个batch训练是不可行的,所以batch_size一般都是1,对吗?

自己的深度学习模型可以导入已经预训练好的参数,采用如下的代码可以导入原模型与预训练模型名字相同层的参数。 pretrained_model = models.xxx(pretrained=True) my_model = net() pretrained_dict = pretrained_model.state_dict() model_dict = my_model.state_dict() pretrained_dict = {k: v for k, v in pretrained_dict.items() if k in model_dict} model_dict.update(pretrained_dict) my_model.load_state_dict(model_dict) 但是如果我的模型和预训练好的模型结构不是完全相同,例如,原预训练模型是若干个conv_2d直接连接而成,而我的模型在每两个conv_2d中间会有一个nn.BatchNorm层,这样导致想要导入参数的层和我模型中的层有错开的情况,再使用上述代码进行导入参数时,由于名字没有办法匹配上,所以就没法按照原先想的吧conv_2d的参数互相导入,请问我说的这种情况有办法解决吗?

I tried some RNN regression learning based on the code in the "PyTorch-Tutorial/tutorial-contents/403_RNN_regressor.py" file, which did not work for me at all. According to an accepted answer on stack-overflow (https://stackoverflow.com/questions/52857213/recurrent-network-rnn-wont-learn-a-very-simple-function-plots-shown-in-the-q?noredirect=1#comment92916825_52857213),...

I try to install pytorch and after days of trying I`m here with a big, big problem. I read a lot of articles of "how to install pytorch" I try...

In the code use rnn to find cos(x) by sin(x), the time_step = 1 and the batch_size = 1?

Updated the code to torch 0.4.1 and added virtual environment and pip3 support

#@ /# first, make sure that your conda is setup properly with the right environment - # for that, check that `which conda`, `which pip` and `which python` > ###...