深度学习与PyTorch入门实战 - 39. Pooling Sampling## PyTorch ## Down/up sample 主讲人:龙良曲 ## Outline - Pooling - upsample ReLU ## Downsample |A|B| |---|---| |C|D| Scaling factor : 2 |A|A|B|B| |---|---|---|---| |A|A|B|B| |C|C|D|D| |C|C|D|D| ## Max Size([1, 16, 7, 7]) In [36]: out=F.avg_pool2d(x,2,stride=2) Out[37]: torch.Size([1, 16, 7, 7]) ## upsample |A|B| |---|---| |C|D| Scaling factor : 2 |A|A|B|B| |---|---|---|---| |A|A|B|B| |C|C|D|D| |C|C|D|D|0 码力 | 13 页 | 749.97 KB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.17.000:00:00 0 2000-01-01 00:03:00 6 2000-01-01 00:06:00 15 2000-01-01 00:09:00 15 Freq: 3T, dtype: int64 Upsample the series into 30 second bins. >>> series.resample('30S')[0:5] #select first 5 rows 2000-01-01 NaN 2000-01-01 00:01:00 1 2000-01-01 00:01:30 NaN 2000-01-01 00:02:00 2 Freq: 30S, dtype: float64 Upsample the series into 30 second bins and fill the NaN values using the pad method. >>> series.resample('30S' 00:00:30 0 2000-01-01 00:01:00 1 2000-01-01 00:01:30 1 2000-01-01 00:02:00 2 Freq: 30S, dtype: int64 Upsample the series into 30 second bins and fill the NaN values using the bfill method. >>> series.resample('30S'0 码力 | 1787 页 | 10.76 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.20.32011-02-28 3 2011-03-31 4 Freq: M, dtype: int64 Note: In the new API, you can either downsample OR upsample. The prior implementation would allow you to pass an aggregator function (like mean) even though converted to higher frequency periods. 19.10.2 Up Sampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:300 码力 | 2045 页 | 9.18 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.21.12011-02-28 3 2011-03-31 4 Freq: M, dtype: int64 Note: In the new API, you can either downsample OR upsample. The prior implementation would allow you to pass an aggregator function (like mean) even though converted to higher frequency periods. 19.10.2 Upsampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:300 码力 | 2207 页 | 8.59 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.19.12011-02-28 3 2011-03-31 4 Freq: M, dtype: int64 Note: In the new API, you can either downsample OR upsample. The prior implementation would allow you to pass an aggregator function (like mean) even though converted to higher frequency periods. ## Up Sampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 00:00:00 0 2000-01-01 00:03:00 6 2000-01-01 00:06:00 15 2000-01-01 00:09:00 15 Freq: 3T, dtype: int64 Upsample the series into 30 second bins. >>> series.resample('30S').asfreq() [0:5] # select0 码力 | 1943 页 | 12.06 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 1.0.0periods are converted to higher frequency periods. Upsampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:30 2000-01-01 00:01:30 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:02:30 NaN 2000-01-01 00:03:00 3.0 Upsample again, providing a fill value. >>> df.asfreq(freq='30S', fill_value=9.0) s 2000-01-01 00:00:00 00 码力 | 3015 页 | 10.78 MB | 2 年前3
《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architectures) ) def get_conv_upsampling_block(filters): """ It creates a block to upsample i.e. increase the spatial dimensions of the inputs. Upsampling is required to ensure that the model0 码力 | 53 页 | 3.92 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 1.1.1periods are converted to higher frequency periods. Upsampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:30 2000-01-01 00:01:30 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:02:30 NaN 2000-01-01 00:03:00 3.0 Upsample again, providing a fill value. >>> df.asfreq(freq='30S', fill_value=9.0) s 2000-01-01 00:00:00 00 码力 | 3231 页 | 10.87 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 1.0.4periods are converted to higher frequency periods. Upsampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:30 2000-01-01 00:01:30 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:02:30 NaN 2000-01-01 00:03:00 3.0 Upsample again, providing a fill value. >>> df.asfreq(freq='30S', fill_value=9.0) s 2000-01-01 00:00:00 00 码力 | 3081 页 | 10.24 MB | 2 年前3
pandas: powerful Python data analysis toolkit -1.0.3periods are converted to higher frequency periods. Upsampling For upsampling, you can specify a way to upsample and the limit parameter to interpolate over the gaps that are created: # from secondly to every 2000-01-01 00:00:00 0.0 2000-01-01 00:01:00 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:03:00 3.0 Upsample the series into 30 second bins. >>> df.asfreq(freq='30S') s 2000-01-01 00:00:00 0.0 2000-01-01 00:00:30 2000-01-01 00:01:30 NaN 2000-01-01 00:02:00 2.0 2000-01-01 00:02:30 NaN 2000-01-01 00:03:00 3.0 Upsample again, providing a fill value. >>> df.asfreq(freq='30S', fill_value=9.0) s 2000-01-01 00:00:00 00 码力 | 3071 页 | 10.10 MB | 2 年前3
共 20 条
- 1
- 2













