日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

fastai学习:06_multicat Questionnarie

發布時間:2025/3/11 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 fastai学习:06_multicat Questionnarie 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.How could multi-label classification improve the usability of the bear classifier?
可以對不存在的熊進行分類
2.How do we encode the dependent variable in a multi-label classification problem?
One-hot encoding: Using a vector of zeros, with a one in each location that is represented in the data, to encode a list of integers.
3.How do you access the rows and columns of a DataFrame as if it was a matrix?
df.iloc
4.How do you get a column by name from a DataFrame?
df[‘name’]
5.What is the difference between a Dataset and DataLoader?
Dataset:: A collection that returns a tuple of your independent and dependent variable for a single item
DataLoader:: An iterator that provides a stream of mini-batches, where each mini-batch is a tuple of a batch of independent variables and a batch of dependent variables
6.What does a Datasets object normally contain?
training set and valid set
7. What does a DataLoaders object normally contain?
training dataloader and valid dataloader
8. What does lambda do in Python?
一種簡寫函數的方式
9.What are the methods to customize how the independent and dependent variables are created with the data block API?
get_x:自變量
get_y:因變量
10.Why is softmax not an appropriate output activation function when using a one hot encoded target?
softmax只能預測一個結果,無法滿足多標簽需求
11.Why is nll_loss not an appropriate loss function when using a one-hot-encoded target?
nll_loss只能返回一個激活值
12.What is the difference between nn.BCELoss and nn.BCEWithLogitsLoss?
F.binary_cross_entropy and its module equivalent nn.BCELoss calculate cross-entropy on a one-hot-encoded target, but do not include the initial sigmoid. Normally for one-hot-encoded targets you’ll want F.binary_cross_entropy_with_logits (or nn.BCEWithLogitsLoss), which do both sigmoid and binary cross-entropy in a single function.
13.Why can’t we use regular accuracy in a multi-label problem?
常規準確性函數假設最終預測結果為可能性做的多類別,但是在多標簽問題中,需要設置激活閾值,以選擇最終預測結果,以便于分類目標比較。
14.When is it okay to tune a hyperparameter on the validation set?
In this case, we’re using the validation set to pick a hyperparameter (the threshold), which is the purpose of the validation set. Sometimes students have expressed their concern that we might be overfitting to the validation set, since we’re trying lots of values to see which is the best. However, as you see in the plot, changing the threshold in this case results in a smooth curve, so we’re clearly not picking some inappropriate outlier. This is a good example of where you have to be careful of the difference between theory (don’t try lots of hyperparameter values or you might overfit the validation set) versus practice (if the relationship is smooth, then it’s fine to do this).
當組成的曲線是平滑的時,可以
15.How is y_range implemented in fastai? (See if you can implement it yourself and test it without peeking!)
def sigmod(x, hi, lo):
return x.sigmod()*(hi-lo)+lo
16.What is a regression problem? What loss function should you use for such a problem?
預測連續型結果,mse
17.What do you need to do to make sure the fastai library applies the same data augmentation to your input images and your target point coordinates?
PointBlock.
The only other difference from the previous data block examples is that the second block is a PointBlock. This is necessary so that fastai knows that the labels represent coordinates; that way, it knows that when doing data augmentation, it should do the same augmentation to these coordinates as it does to the images:

總結

以上是生活随笔為你收集整理的fastai学习:06_multicat Questionnarie的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。