Ecoer Logo
cryptopossible

@cryptopossible

25
hive.blog/@cryptopossible
VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS0.00%
Net Worth
3.384USD
HIVE
0.002HIVE
HBD
0.578HBD
Own HP
7.014HP

Detailed Balance

HIVE
balance
0.002HIVE
market_balance
0.000HIVE
savings_balance
0.000HIVE
reward_hive_balance
0.000HIVE
HIVE POWER
Own HP
7.014HP
Delegated Out
0.000HP
Delegation In
0.000HP
Effective Power
7.014HP
Reward HP (pending)
0.000HP
HBD
hbd_balance
0.578HBD
hbd_conversions
0.000HBD
hbd_market_balance
0.000HBD
savings_hbd_balance
0.000HBD
reward_hbd_balance
0.000HBD
{
  "balance": "0.002 HIVE",
  "savings_balance": "0.000 HIVE",
  "reward_hive_balance": "0.000 HIVE",
  "vesting_shares": "11386.056287 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "0.000000 VESTS",
  "hbd_balance": "0.578 HBD",
  "savings_hbd_balance": "0.000 HBD",
  "reward_hbd_balance": "0.000 HBD"
}

Account Info

namecryptopossible
id1278079
rank0
reputation0
created2019-05-27T13:43:48
recovery_accountsteemwallet.born
proxyNone
invited_bynull
post_count991
comment_count0
lifetime_vote_count0
witnesses_voted_for0
last_post2020-06-29T13:28:15
last_root_post2020-06-29T13:28:15
last_vote_time2020-06-02T11:29:36
proxied_vsf_votes0, 0, 0, 0
can_vote1
voting_power0
delayed_votesNone
governance_vote_expiration_ts1969-12-31T23:59:59
balance0.002 HIVE
savings_balance0.000 HIVE
hbd_balance0.578 HBD
savings_hbd_balance0.000 HBD
vesting_shares11386.056287 VESTS
delegated_vesting_shares0.000000 VESTS
received_vesting_shares0.000000 VESTS
reward_vesting_balance0.000000 VESTS
vesting_balance0.000 HIVE
vesting_withdraw_rate0.000000 VESTS
next_vesting_withdrawal1969-12-31T23:59:59
withdrawn0
to_withdraw0
withdraw_routes0
savings_withdraw_requests0
last_account_recovery1970-01-01T00:00:00
reset_accountnull
last_owner_update1970-01-01T00:00:00
last_account_update2020-04-29T07:08:42
minedNo
hbd_seconds804,019,092
hbd_last_interest_payment2020-06-12T13:43:24
savings_hbd_last_interest_payment1970-01-01T00:00:00
{
  "id": 1278079,
  "name": "cryptopossible",
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8enx161opg1tVUbagPmVQshKM56NPPftNRzdpNEqsshXGdKLEs",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM71EChbPkAEypxPkSRu9B6chid3TYE5chgD56QoryKdbLs69jeL",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [
      [
        "steempeak.app",
        1
      ],
      [
        "threespeak",
        1
      ]
    ],
    "key_auths": [
      [
        "STM6HCAMrW17J8GDsxqJRhv7njnWWF2GGQd1ULNYEKDJX6CMA2wzL",
        1
      ]
    ]
  },
  "memo_key": "STM8KSE9bynaDeKMqkmDrPgbhLdABiMV83bo46FYHVTP9XxpP4RsK",
  "json_metadata": "",
  "posting_json_metadata": "",
  "proxy": "",
  "previous_owner_update": "1970-01-01T00:00:00",
  "last_owner_update": "1970-01-01T00:00:00",
  "last_account_update": "2020-04-29T07:08:42",
  "created": "2019-05-27T13:43:48",
  "mined": false,
  "recovery_account": "steemwallet.born",
  "last_account_recovery": "1970-01-01T00:00:00",
  "reset_account": "null",
  "comment_count": 0,
  "lifetime_vote_count": 0,
  "post_count": 991,
  "can_vote": true,
  "voting_manabar": {
    "current_mana": 453596265038,
    "last_update_time": 1593437361
  },
  "downvote_manabar": {
    "current_mana": 113399066258,
    "last_update_time": 1593437361
  },
  "voting_power": 0,
  "balance": "0.002 HIVE",
  "savings_balance": "0.000 HIVE",
  "hbd_balance": "0.578 HBD",
  "hbd_seconds": "804019092",
  "hbd_seconds_last_update": "2020-06-29T13:29:21",
  "hbd_last_interest_payment": "2020-06-12T13:43:24",
  "savings_hbd_balance": "0.000 HBD",
  "savings_hbd_seconds": "0",
  "savings_hbd_seconds_last_update": "1970-01-01T00:00:00",
  "savings_hbd_last_interest_payment": "1970-01-01T00:00:00",
  "savings_withdraw_requests": 0,
  "reward_hbd_balance": "0.000 HBD",
  "reward_hive_balance": "0.000 HIVE",
  "reward_vesting_balance": "0.000000 VESTS",
  "reward_vesting_hive": "0.000 HIVE",
  "vesting_shares": "11386.056287 VESTS",
  "delegated_vesting_shares": "0.000000 VESTS",
  "received_vesting_shares": "0.000000 VESTS",
  "vesting_withdraw_rate": "0.000000 VESTS",
  "post_voting_power": "11386.056287 VESTS",
  "next_vesting_withdrawal": "1969-12-31T23:59:59",
  "withdrawn": 0,
  "to_withdraw": 0,
  "withdraw_routes": 0,
  "pending_transfers": 0,
  "curation_rewards": 6196,
  "posting_rewards": 2263254,
  "proxied_vsf_votes": [
    0,
    0,
    0,
    0
  ],
  "witnesses_voted_for": 0,
  "last_post": "2020-06-29T13:28:15",
  "last_root_post": "2020-06-29T13:28:15",
  "last_vote_time": "2020-06-02T11:29:36",
  "post_bandwidth": 0,
  "pending_claimed_accounts": 0,
  "governance_vote_expiration_ts": "1969-12-31T23:59:59",
  "delayed_votes": [],
  "open_recurrent_transfers": 0,
  "vesting_balance": "0.000 HIVE",
  "reputation": 0,
  "transfer_history": [],
  "market_history": [],
  "post_history": [],
  "vote_history": [],
  "other_history": [],
  "witness_votes": [],
  "tags_usage": [],
  "guest_bloggers": [],
  "rank": 0
}

Withdraw Routes

IncomingOutgoing
Empty
Empty
{
  "incoming": [],
  "outgoing": []
}
From Date
To Date
terablock-hivesent 0.001 HIVE to @cryptopossible- "Join 220+ Hive members in supporting our Hive CrossDEX proposal to expand Hive's DeFi ecosystem. Every vote brings us closer to a decentralised financial future. 🚀 Your support matters! Vote now: htt..."
2024/02/15 13:36:00
amount0.001 HIVE
fromterablock-hive
memoJoin 220+ Hive members in supporting our Hive CrossDEX proposal to expand Hive's DeFi ecosystem. Every vote brings us closer to a decentralised financial future. 🚀 Your support matters! Vote now: https://peakd.com/me/proposals/295
tocryptopossible
Transaction InfoBlock #82830466/Trx 0ed98c58fe936e37c6eb26531eb8d858517dc92f
View Raw JSON Data
{
  "block": 82830466,
  "op": [
    "transfer",
    {
      "amount": "0.001 HIVE",
      "from": "terablock-hive",
      "memo": "Join 220+ Hive members in supporting our Hive CrossDEX proposal to expand Hive's DeFi ecosystem. Every vote brings us closer to a decentralised financial future. 🚀 Your support matters! Vote now: https://peakd.com/me/proposals/295",
      "to": "cryptopossible"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2024-02-15T13:36:00",
  "trx_id": "0ed98c58fe936e37c6eb26531eb8d858517dc92f",
  "trx_in_block": 27,
  "virtual_op": false
}
hivesurveysent 0.001 HIVE to @cryptopossible- "By spending just 5-10 minutes of your time to answer an ONLINE SURVEY, you'll receive $1 worth of HIVE or STEEM (4.762 STEEM or 3.125 HIVE) as a token of our appreciation!!! Hello there! I'm Sichen DO..."
2023/10/29 05:24:42
amount0.001 HIVE
fromhivesurvey
memoBy spending just 5-10 minutes of your time to answer an ONLINE SURVEY, you'll receive $1 worth of HIVE or STEEM (4.762 STEEM or 3.125 HIVE) as a token of our appreciation!!! Hello there! I'm Sichen DONG, a research postgraduate student at the University of Hong Kong. I'm currently organizing a paid survey as part of my research study. We kindly invite Steem/Hive members to participate in a survey that focuses on the social changes you've observed since the takeover of Steemit, Inc. by Tron on February 14, 2020. We're delving into the intriguing realm of decentralized autonomous organizations (DAOs) and exploring the impact of social norms on cooperation within these communities. Please note that the survey is conducted in English. Rest assured, your participation involves no more risk than your everyday activities. You retain the freedom to withdraw from the study at any point. Your support is invaluable to our research, and we're eagerly looking forward to your participation! Ready to dive in? Access the survey via this link: https://hivesurvey.vercel.app/
tocryptopossible
Transaction InfoBlock #79685179/Trx bf25da92628a2605c6031bb55227e98a7be9cd4e
View Raw JSON Data
{
  "block": 79685179,
  "op": [
    "transfer",
    {
      "amount": "0.001 HIVE",
      "from": "hivesurvey",
      "memo": "By spending just 5-10 minutes of your time to answer an ONLINE SURVEY, you'll receive $1 worth of HIVE or STEEM (4.762 STEEM or 3.125 HIVE) as a token of our appreciation!!! Hello there! I'm Sichen DONG, a research postgraduate student at the University of Hong Kong. I'm currently organizing a paid survey as part of my research study. We kindly invite Steem/Hive members to participate in a survey that focuses on the social changes you've observed since the takeover of Steemit, Inc. by Tron on February 14, 2020. We're delving into the intriguing realm of decentralized autonomous organizations (DAOs) and exploring the impact of social norms on cooperation within these communities. Please note that the survey is conducted in English. Rest assured, your participation involves no more risk than your everyday activities. You retain the freedom to withdraw from the study at any point. Your support is invaluable to our research, and we're eagerly looking forward to your participation! Ready to dive in? Access the survey via this link: https://hivesurvey.vercel.app/",
      "to": "cryptopossible"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2023-10-29T05:24:42",
  "trx_id": "bf25da92628a2605c6031bb55227e98a7be9cd4e",
  "trx_in_block": 14,
  "virtual_op": false
}
2022/12/17 21:24:15
accountcryptopossible
Transaction InfoBlock #70614711/Virtual Operation 4294967295:3
View Raw JSON Data
{
  "block": 70614711,
  "op": [
    "expired_account_notification",
    {
      "account": "cryptopossible"
    }
  ],
  "op_in_trx": 3,
  "timestamp": "2022-12-17T21:24:15",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblecustom json: notify
2020/08/15 09:53:33
idnotify
json["setLastRead",{"date":"2020-08-15T09:51:25"}]
required auths[]
required posting auths["cryptopossible"]
Transaction InfoBlock #46062933/Trx 4c8b928f3f56f7076b4253d57ceb56d2f2c39916
View Raw JSON Data
{
  "block": 46062933,
  "op": [
    "custom_json",
    {
      "id": "notify",
      "json": "[\"setLastRead\",{\"date\":\"2020-08-15T09:51:25\"}]",
      "required_auths": [],
      "required_posting_auths": [
        "cryptopossible"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-08-15T09:53:33",
  "trx_id": "4c8b928f3f56f7076b4253d57ceb56d2f2c39916",
  "trx_in_block": 32,
  "virtual_op": false
}
cryptopossiblesent 996.592 HIVE to @deepcrypto8- "100925935"
2020/08/15 09:51:42
amount996.592 HIVE
fromcryptopossible
memo100925935
todeepcrypto8
Transaction InfoBlock #46062896/Trx 9fcc2426bc8c5a1728ef09f4dbabfadc03556c33
View Raw JSON Data
{
  "block": 46062896,
  "op": [
    "transfer",
    {
      "amount": "996.592 HIVE",
      "from": "cryptopossible",
      "memo": "100925935",
      "to": "deepcrypto8"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-08-15T09:51:42",
  "trx_id": "9fcc2426bc8c5a1728ef09f4dbabfadc03556c33",
  "trx_in_block": 22,
  "virtual_op": false
}
cryptopossiblereceived 76.073 HIVE from power down installment (90.803 HP)
2020/07/26 08:17:42
deposited76.073 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402915 VESTS
Transaction InfoBlock #45486283/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 45486283,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "76.073 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402915 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-07-26T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblereceived 76.025 HIVE from power down installment (90.803 HP)
2020/07/19 08:17:42
deposited76.025 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #45285111/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 45285111,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "76.025 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-07-19T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblereceived 75.976 HIVE from power down installment (90.803 HP)
2020/07/12 08:17:42
deposited75.976 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #45084010/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 45084010,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.976 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-07-12T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/07/06 13:28:15
authorcryptopossible
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
Transaction InfoBlock #44917890/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44917890,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-07-06T13:28:15",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblereceived 75.927 HIVE from power down installment (90.803 HP)
2020/07/05 08:17:42
deposited75.927 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #44882952/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44882952,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.927 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-07-05T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/29 13:51:48
authorcryptopossible
body@@ -1,69 +1,4 @@ -Deep Learning Course Project: Japanese hostel price prediction. %0A %0A%0AHo
json metadata{"app":"peakd/2020.06.2","format":"markdown","description":"Coding an algorithm from scratch!","tags":["ai","ml","deeplearning","machinelearning","zerotogans","pytorch","india","learn"],"links":["https://jovian.ml/oneworldcoder/05-02-japan-hostel"],"image":["https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png"]}
parent author
parent permlinkhive-175254
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
titleDeep Learning Course Project: Japanese hostel price prediction.
Transaction InfoBlock #44717233/Trx df6650ebe0c8e31f72cb469210126d558c41530b
View Raw JSON Data
{
  "block": 44717233,
  "op": [
    "comment",
    {
      "author": "cryptopossible",
      "body": "@@ -1,69 +1,4 @@\n-Deep Learning Course Project: Japanese hostel price prediction. %0A\n %0A%0AHo\n",
      "json_metadata": "{\"app\":\"peakd/2020.06.2\",\"format\":\"markdown\",\"description\":\"Coding an algorithm from scratch!\",\"tags\":[\"ai\",\"ml\",\"deeplearning\",\"machinelearning\",\"zerotogans\",\"pytorch\",\"india\",\"learn\"],\"links\":[\"https://jovian.ml/oneworldcoder/05-02-japan-hostel\"],\"image\":[\"https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png\"]}",
      "parent_author": "",
      "parent_permlink": "hive-175254",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "title": "Deep Learning Course Project: Japanese hostel price prediction. "
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:51:48",
  "trx_id": "df6650ebe0c8e31f72cb469210126d558c41530b",
  "trx_in_block": 1,
  "virtual_op": false
}
2020/06/29 13:33:30
authorcryptopossible
pending payout0.000 HBD
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
rshares1173717929
total vote weight1169
voterputu300
weight586 (5.86%)
Transaction InfoBlock #44716868/Trx 73dac92a304e802bdbc9f69521e4200e953485c3
View Raw JSON Data
{
  "block": 44716868,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.000 HBD",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "rshares": 1173717929,
      "total_vote_weight": 1169,
      "voter": "putu300",
      "weight": 586
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-29T13:33:30",
  "trx_id": "73dac92a304e802bdbc9f69521e4200e953485c3",
  "trx_in_block": 22,
  "virtual_op": true
}
2020/06/29 13:33:30
authorcryptopossible
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
voterputu300
weight430 (4.30%)
Transaction InfoBlock #44716868/Trx 73dac92a304e802bdbc9f69521e4200e953485c3
View Raw JSON Data
{
  "block": 44716868,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "voter": "putu300",
      "weight": 430
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:33:30",
  "trx_id": "73dac92a304e802bdbc9f69521e4200e953485c3",
  "trx_in_block": 22,
  "virtual_op": false
}
2020/06/29 13:32:27
authorcryptopossible
pending payout0.000 HBD
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
rshares1130572104
total vote weight583
voterbesheda
weight468 (4.68%)
Transaction InfoBlock #44716847/Trx de6b1be32a53888fd45a2951d7572f6d2932998d
View Raw JSON Data
{
  "block": 44716847,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.000 HBD",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "rshares": 1130572104,
      "total_vote_weight": 583,
      "voter": "besheda",
      "weight": 468
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-29T13:32:27",
  "trx_id": "de6b1be32a53888fd45a2951d7572f6d2932998d",
  "trx_in_block": 2,
  "virtual_op": true
}
2020/06/29 13:32:27
authorcryptopossible
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
voterbesheda
weight4300 (43.00%)
Transaction InfoBlock #44716847/Trx de6b1be32a53888fd45a2951d7572f6d2932998d
View Raw JSON Data
{
  "block": 44716847,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "voter": "besheda",
      "weight": 4300
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:32:27",
  "trx_id": "de6b1be32a53888fd45a2951d7572f6d2932998d",
  "trx_in_block": 2,
  "virtual_op": false
}
cryptopossibleclaimed reward balance: 0.006 HBD, 0.031 HP
2020/06/29 13:29:24
accountcryptopossible
reward hbd0.006 HBD
reward hive0.000 HIVE
reward vests50.551051 VESTS
Transaction InfoBlock #44716786/Trx 3abc5709efd796c1c6b39903327fa0f42affa4d7
View Raw JSON Data
{
  "block": 44716786,
  "op": [
    "claim_reward_balance",
    {
      "account": "cryptopossible",
      "reward_hbd": "0.006 HBD",
      "reward_hive": "0.000 HIVE",
      "reward_vests": "50.551051 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:29:24",
  "trx_id": "3abc5709efd796c1c6b39903327fa0f42affa4d7",
  "trx_in_block": 3,
  "virtual_op": false
}
2020/06/29 13:28:45
authorcryptopossible
pending payout0.000 HBD
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
rshares37632149
total vote weight18
voterlaissez-faire
weight1 (0.01%)
Transaction InfoBlock #44716773/Trx 1cc732ffaa2e2bcf6338b22beee7e0e5723b1298
View Raw JSON Data
{
  "block": 44716773,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.000 HBD",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "rshares": 37632149,
      "total_vote_weight": 18,
      "voter": "laissez-faire",
      "weight": 1
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-29T13:28:45",
  "trx_id": "1cc732ffaa2e2bcf6338b22beee7e0e5723b1298",
  "trx_in_block": 23,
  "virtual_op": true
}
2020/06/29 13:28:45
authorcryptopossible
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
voterlaissez-faire
weight10000 (100.00%)
Transaction InfoBlock #44716773/Trx 1cc732ffaa2e2bcf6338b22beee7e0e5723b1298
View Raw JSON Data
{
  "block": 44716773,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "voter": "laissez-faire",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:28:45",
  "trx_id": "1cc732ffaa2e2bcf6338b22beee7e0e5723b1298",
  "trx_in_block": 23,
  "virtual_op": false
}
cryptopossiblecustom json: follow
2020/06/29 13:28:30
idfollow
json["reblog",{"account":"cryptopossible","author":"cryptopossible","permlink":"deep-learning-course-project-japanese-hostel-price-prediction"}]
required auths[]
required posting auths["cryptopossible"]
Transaction InfoBlock #44716768/Trx 9c784a3c54702ee4edff175e38061e3d69d6bf6b
View Raw JSON Data
{
  "block": 44716768,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"reblog\",{\"account\":\"cryptopossible\",\"author\":\"cryptopossible\",\"permlink\":\"deep-learning-course-project-japanese-hostel-price-prediction\"}]",
      "required_auths": [],
      "required_posting_auths": [
        "cryptopossible"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:28:30",
  "trx_id": "9c784a3c54702ee4edff175e38061e3d69d6bf6b",
  "trx_in_block": 1,
  "virtual_op": false
}
2020/06/29 13:28:18
authorcryptopossible
bodyDeep Learning Course Project: Japanese hostel price prediction. Hostels are very important for backpackers and teens because they provide an economical housing option and promote travel. When we travel, we meet new people, engage in meaningful conversation, and widen our horizon of knowledge. So, I decided to train a model to predict the hostel prices in Japan. ``` def customize_dataset(dataframe_raw): dataframe = dataframe_raw.copy(deep=True) # drop some columns dataframe = dataframe.drop(['Unnamed: 0', 'hostel.name', 'Distance', 'lon', 'lat', 'atmosphere', 'cleanliness', 'facilities', 'location.y', 'security', 'staff'], axis=1) # for col in ['City', 'rating.band']: # # normalizing incoming data # dataframe[col] = (dataframe[col] - min(dataframe[col])) / (max(dataframe[col]) - min(dataframe[col])) # dropping any row that contains at least on missing value dataframe = dataframe.dropna(axis=0) return dataframe dataframe = customize_dataset(dataframe) dataframe.head() ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png) My main objective was to concentrate on four important factors which determine hostel prices. These factors were location, value for money, customer rating and the rating range. Once these factors were correlated, they could be used for predictions. Hence, finding the factors which could correlate with each other was very important. ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png) ``` # Convert from Pandas dataframe to numpy arrays def dataframe_to_arrays(dataframe): # Make a copy of the original dataframe dataframe1 = dataframe.copy(deep=True) # Convert non-numeric categorical columns to numbers for col in categorical_cols: dataframe1[col] = dataframe1[col].astype('category').cat.codes # Extract input & outupts as numpy arrays inputs_array = dataframe1[input_cols].to_numpy() targets_array = dataframe1[output_cols].to_numpy() return inputs_array, targets_array inputs_array, targets_array = dataframe_to_arrays(dataframe) inputs_array, targets_array ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png) ``` inputs = torch.from_numpy(inputs_array).type(torch.float32) targets = torch.from_numpy(targets_array).type(torch.float32) dataset = TensorDataset(inputs, targets) val_percent = 0.1 # between 0.1 and 0.2 val_size = int(num_rows * val_percent) train_size = num_rows - val_size # Use the random_split function to split dataset into 2 parts of the desired length train_ds, val_ds = random_split(dataset, [train_size, val_size]) train_loader = DataLoader(train_ds, batch_size, shuffle=True) val_loader = DataLoader(val_ds, batch_size) input_size = len(input_cols) output_size = len(output_cols) print(len(input_cols)) print(len(output_cols)) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png) ``` class HousingModel(nn.Module): def __init__(self): super().__init__() self.linear1 = nn.Linear(input_size, 8) self.linear2 = nn.Linear(8, 16) self.linear3 = nn.Linear(16, output_size) def forward(self, xb): out = self.linear1(xb) out = F.relu(out) out = self.linear2(out) out = F.relu(out) out = self.linear3(out) return out def training_step(self, batch): inputs, targets = batch out = self(inputs) # Generate predictions loss = F.l1_loss(out, targets) # Calculate loss return loss def validation_step(self, batch): inputs, targets = batch out = self(inputs) # Generate predictions loss = F.l1_loss(out, targets) # Calculate loss return {'val_loss': loss.detach()} def validation_epoch_end(self, outputs): batch_losses = [x['val_loss'] for x in outputs] epoch_loss = torch.stack(batch_losses).mean() # Combine losses return {'val_loss': epoch_loss.item()} def epoch_end(self, epoch, result): print("Epoch [{}], val_loss: {:.4f}".format(epoch, result['val_loss'])) model = HousingModel() def evaluate(model, val_loader): outputs = [model.validation_step(batch) for batch in val_loader] return model.validation_epoch_end(outputs) def fit(epochs, max_lr, model, train_loader, val_loader, weight_decay=0, grad_clip=None, opt_func=torch.optim.SGD): history = [] optimizer = opt_func(model.parameters(), max_lr, weight_decay=weight_decay) sched = torch.optim.lr_scheduler.OneCycleLR(optimizer, max_lr, epochs=epochs, steps_per_epoch=len(train_loader)) for epoch in range(epochs): # Training Phase for batch in train_loader: loss = model.training_step(batch) loss.backward() if grad_clip: nn.utils.clip_grad_value_(model.parameters(), grad_clip) optimizer.step() optimizer.zero_grad() # Validation phase result = evaluate(model, val_loader) model.epoch_end(epoch, result) history.append(result) return history epochs = 40 max_lr = 1.5 grad_clip = 9 weight_decay = 1e-8 opt_func = torch.optim.Adam history= fit(epochs, max_lr, model, train_loader, val_loader, weight_decay=weight_decay, grad_clip=grad_clip, opt_func=opt_func) history ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png) ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png) This principle of correlation is commonly used by travel websites/apps to help customers find the right hostel by running price predicting algorithms. ``` losses = [r['val_loss'] for r in [result] + history] plt.plot(losses, '-x') plt.xlabel('epoch') plt.ylabel('val_loss') plt.title('val_loss vs. epochs'); ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png) ``` def predict_single(x, model): xb = x.unsqueeze(0) return model(x).item() ``` ``` x, target = val_ds[4] pred = predict_single(x, model) print("Input: ", x) print("Target: ", target.item()) print("Prediction:", pred) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png) ``` x, target = val_ds[1] pred = predict_single(x, model) print("Input: ", x) print("Target: ", target.item()) print("Prediction:", pred) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png) According to my algorithm, the predictions were close to the actual price. Hence, to code a good algorithm our data should have an equal number of hostels from different price segments. To view my Jupyter notebook [click here](https://jovian.ml/oneworldcoder/05-02-japan-hostel). Please feel free to give your feedback.
json metadata{"app":"peakd/2020.06.2","format":"markdown","description":"Coding an algorithm from scratch!","tags":["ai","ml","deeplearning","machinelearning","zerotogans","pytorch","india","learn"],"links":["https://jovian.ml/oneworldcoder/05-02-japan-hostel"],"image":["https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png"]}
parent author
parent permlinkhive-175254
permlinkdeep-learning-course-project-japanese-hostel-price-prediction
titleDeep Learning Course Project: Japanese hostel price prediction.
Transaction InfoBlock #44716764/Trx c666628a11adcf0fe62dddaae07bc17152f518d2
View Raw JSON Data
{
  "block": 44716764,
  "op": [
    "comment",
    {
      "author": "cryptopossible",
      "body": "Deep Learning Course Project: Japanese hostel price prediction. \n\n\nHostels are very important for backpackers and teens because they provide an economical housing option and promote travel. When we travel, we meet new people, engage in meaningful conversation, and widen our horizon of knowledge. So, I decided to train a model to predict the hostel prices in Japan. \n\n```\ndef customize_dataset(dataframe_raw):\n    dataframe = dataframe_raw.copy(deep=True)\n    # drop some columns\n    dataframe = dataframe.drop(['Unnamed: 0', 'hostel.name', 'Distance', 'lon', 'lat', 'atmosphere', 'cleanliness',\n                                'facilities', 'location.y', 'security', 'staff'], axis=1)\n#     for col in ['City', 'rating.band']:\n#        # normalizing incoming data\n#        dataframe[col] = (dataframe[col] - min(dataframe[col])) / (max(dataframe[col]) - min(dataframe[col]))\n    \n    # dropping any row that contains at least on missing value\n    dataframe = dataframe.dropna(axis=0)  \n    \n    return dataframe\n\ndataframe = customize_dataset(dataframe)\n\ndataframe.head()\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png)\nMy main objective was to concentrate on four important factors which determine hostel prices. These factors were location, value for money, customer rating and the rating range. Once these factors were correlated, they could be used for predictions. Hence, finding the factors which could correlate with each other was very important.\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png)\n\n```\n# Convert from Pandas dataframe to numpy arrays\n\n\ndef dataframe_to_arrays(dataframe):\n    # Make a copy of the original dataframe\n    dataframe1 = dataframe.copy(deep=True)\n    # Convert non-numeric categorical columns to numbers\n    for col in categorical_cols:\n        dataframe1[col] = dataframe1[col].astype('category').cat.codes\n    \n    # Extract input & outupts as numpy arrays\n    inputs_array = dataframe1[input_cols].to_numpy()\n    targets_array = dataframe1[output_cols].to_numpy()\n    return inputs_array, targets_array\n\ninputs_array, targets_array = dataframe_to_arrays(dataframe)\ninputs_array, targets_array\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png)\n\n```\ninputs = torch.from_numpy(inputs_array).type(torch.float32)\ntargets = torch.from_numpy(targets_array).type(torch.float32)\n\ndataset = TensorDataset(inputs, targets)\n\nval_percent = 0.1 # between 0.1 and 0.2\nval_size = int(num_rows * val_percent)\ntrain_size = num_rows - val_size\n\n# Use the random_split function to split dataset into 2 parts of the desired length\ntrain_ds, val_ds = random_split(dataset, [train_size, val_size]) \n\ntrain_loader = DataLoader(train_ds, batch_size, shuffle=True)\nval_loader = DataLoader(val_ds, batch_size)\n\ninput_size = len(input_cols)\noutput_size = len(output_cols)\nprint(len(input_cols))\nprint(len(output_cols))\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png)\n\n\n\n\n```\nclass HousingModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.linear1 = nn.Linear(input_size, 8)\n        self.linear2 = nn.Linear(8, 16)\n        self.linear3 = nn.Linear(16, output_size)\n        \n    def forward(self, xb):\n        out = self.linear1(xb)\n        out = F.relu(out)\n        out = self.linear2(out)\n        out = F.relu(out)\n        out = self.linear3(out)\n        return out\n    \n    def training_step(self, batch):\n        inputs, targets = batch \n        out = self(inputs)                 # Generate predictions\n        loss = F.l1_loss(out, targets)    # Calculate loss\n        return loss\n    \n    def validation_step(self, batch):\n        inputs, targets = batch \n        out = self(inputs)                 # Generate predictions\n        loss = F.l1_loss(out, targets)    # Calculate loss\n        return {'val_loss': loss.detach()}\n        \n    def validation_epoch_end(self, outputs):\n        batch_losses = [x['val_loss'] for x in outputs]\n        epoch_loss = torch.stack(batch_losses).mean()   # Combine losses\n        return {'val_loss': epoch_loss.item()}\n    \n    def epoch_end(self, epoch, result):\n        print(\"Epoch [{}], val_loss: {:.4f}\".format(epoch, result['val_loss']))\n    \nmodel = HousingModel()\ndef evaluate(model, val_loader):\n    outputs = [model.validation_step(batch) for batch in val_loader]\n    return model.validation_epoch_end(outputs)\n\ndef fit(epochs, max_lr, model, train_loader, val_loader, weight_decay=0, grad_clip=None, opt_func=torch.optim.SGD):\n    history = []\n    optimizer = opt_func(model.parameters(), max_lr, weight_decay=weight_decay)\n    sched = torch.optim.lr_scheduler.OneCycleLR(optimizer, max_lr, epochs=epochs, \n                                                steps_per_epoch=len(train_loader))\n    for epoch in range(epochs):\n        # Training Phase \n        for batch in train_loader:\n            loss = model.training_step(batch)\n            loss.backward()\n            if grad_clip: \n                nn.utils.clip_grad_value_(model.parameters(), grad_clip)\n            optimizer.step()\n            optimizer.zero_grad()\n        # Validation phase\n        result = evaluate(model, val_loader)\n        model.epoch_end(epoch, result)\n        history.append(result)\n    return history\n\nepochs = 40\nmax_lr = 1.5\ngrad_clip = 9\nweight_decay = 1e-8\nopt_func = torch.optim.Adam\n\n\nhistory= fit(epochs, max_lr, model, train_loader, val_loader, weight_decay=weight_decay, grad_clip=grad_clip, opt_func=opt_func)\n\nhistory\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png)\n\n\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png)\n\n\nThis principle of correlation is commonly used by travel websites/apps to help customers find the right hostel by running price predicting algorithms.  \n```\nlosses = [r['val_loss'] for r in [result] + history]\nplt.plot(losses, '-x')\nplt.xlabel('epoch')\nplt.ylabel('val_loss')\nplt.title('val_loss vs. epochs');\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png)\n\n\n```\ndef predict_single(x, model):\n    xb = x.unsqueeze(0)\n    return model(x).item()\n```\n```\nx, target = val_ds[4]\npred = predict_single(x, model)\nprint(\"Input: \", x)\nprint(\"Target: \", target.item())\nprint(\"Prediction:\", pred)\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png)\n\n\n```\nx, target = val_ds[1]\npred = predict_single(x, model)\nprint(\"Input: \", x)\nprint(\"Target: \", target.item())\nprint(\"Prediction:\", pred)\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png)\n\n\n\nAccording to my algorithm, the predictions were close to the actual price. Hence, to code a good algorithm our data should have an equal number of hostels from different price segments. \n \n\nTo view my Jupyter notebook [click here](https://jovian.ml/oneworldcoder/05-02-japan-hostel). Please feel free to give your feedback.\n",
      "json_metadata": "{\"app\":\"peakd/2020.06.2\",\"format\":\"markdown\",\"description\":\"Coding an algorithm from scratch!\",\"tags\":[\"ai\",\"ml\",\"deeplearning\",\"machinelearning\",\"zerotogans\",\"pytorch\",\"india\",\"learn\"],\"links\":[\"https://jovian.ml/oneworldcoder/05-02-japan-hostel\"],\"image\":[\"https://files.peakd.com/file/peakd-hive/cryptopossible/iAyEw5m0-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/vCHmayap-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/aAr1oesQ-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/7H4Epp6M-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/qa4CigZP-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/N0QTpHGR-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/esrHhtHT-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/UbqYMuwl-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/SZFcOdxN-image.png\"]}",
      "parent_author": "",
      "parent_permlink": "hive-175254",
      "permlink": "deep-learning-course-project-japanese-hostel-price-prediction",
      "title": "Deep Learning Course Project: Japanese hostel price prediction. "
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:28:18",
  "trx_id": "c666628a11adcf0fe62dddaae07bc17152f518d2",
  "trx_in_block": 26,
  "virtual_op": false
}
cryptopossiblesubscribe hive-175254
2020/06/29 13:02:48
idcommunity
json["subscribe",{"community":"hive-175254"}]
required auths[]
required posting auths["cryptopossible"]
Transaction InfoBlock #44716255/Trx 8a0286c839b48607a8838ff3dac19ca5625ead93
View Raw JSON Data
{
  "block": 44716255,
  "op": [
    "custom_json",
    {
      "id": "community",
      "json": "[\"subscribe\",{\"community\":\"hive-175254\"}]",
      "required_auths": [],
      "required_posting_auths": [
        "cryptopossible"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-29T13:02:48",
  "trx_id": "8a0286c839b48607a8838ff3dac19ca5625ead93",
  "trx_in_block": 20,
  "virtual_op": false
}
cryptopossiblereceived 75.879 HIVE from power down installment (90.803 HP)
2020/06/28 08:17:42
deposited75.879 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #44681841/Virtual Operation 4294967295:7
View Raw JSON Data
{
  "block": 44681841,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.879 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 7,
  "timestamp": "2020-06-28T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblereceived 75.830 HIVE from power down installment (90.803 HP)
2020/06/21 08:17:42
deposited75.830 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #44480686/Virtual Operation 4294967295:3
View Raw JSON Data
{
  "block": 44480686,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.830 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 3,
  "timestamp": "2020-06-21T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/19 13:33:45
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
Transaction InfoBlock #44429517/Virtual Operation 4294967295:6
View Raw JSON Data
{
  "block": 44429517,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10"
    }
  ],
  "op_in_trx": 6,
  "timestamp": "2020-06-19T13:33:45",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/19 13:33:45
authorcryptopossible
author rewards52
beneficiary payout value0.000 HBD
curator payout value0.011 HBD
payout0.024 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
total payout value0.012 HBD
Transaction InfoBlock #44429517/Virtual Operation 4294967295:5
View Raw JSON Data
{
  "block": 44429517,
  "op": [
    "comment_reward",
    {
      "author": "cryptopossible",
      "author_rewards": 52,
      "beneficiary_payout_value": "0.000 HBD",
      "curator_payout_value": "0.011 HBD",
      "payout": "0.024 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "total_payout_value": "0.012 HBD"
    }
  ],
  "op_in_trx": 5,
  "timestamp": "2020-06-19T13:33:45",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/19 13:33:45
authorcryptopossible
curators vesting payout91.380746 VESTS
hbd payout0.006 HBD
hive payout0.000 HIVE
payout must be claimedtrue
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
vesting payout50.551051 VESTS
Transaction InfoBlock #44429517/Virtual Operation 4294967295:4
View Raw JSON Data
{
  "block": 44429517,
  "op": [
    "author_reward",
    {
      "author": "cryptopossible",
      "curators_vesting_payout": "91.380746 VESTS",
      "hbd_payout": "0.006 HBD",
      "hive_payout": "0.000 HIVE",
      "payout_must_be_claimed": true,
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "vesting_payout": "50.551051 VESTS"
    }
  ],
  "op_in_trx": 4,
  "timestamp": "2020-06-19T13:33:45",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossibleclaimed reward balance: 0.072 HBD, 0.345 HP
2020/06/18 07:16:18
accountcryptopossible
reward hbd0.072 HBD
reward hive0.000 HIVE
reward vests560.101856 VESTS
Transaction InfoBlock #44393254/Trx ef44009260f6439f46fdce9330b89e2cc9f65dcd
View Raw JSON Data
{
  "block": 44393254,
  "op": [
    "claim_reward_balance",
    {
      "account": "cryptopossible",
      "reward_hbd": "0.072 HBD",
      "reward_hive": "0.000 HIVE",
      "reward_vests": "560.101856 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-18T07:16:18",
  "trx_id": "ef44009260f6439f46fdce9330b89e2cc9f65dcd",
  "trx_in_block": 21,
  "virtual_op": false
}
2020/06/16 13:24:33
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
Transaction InfoBlock #44343128/Virtual Operation 4294967295:9
View Raw JSON Data
{
  "block": 44343128,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california"
    }
  ],
  "op_in_trx": 9,
  "timestamp": "2020-06-16T13:24:33",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/16 13:24:33
authorcryptopossible
author rewards576
beneficiary payout value0.000 HBD
curator payout value0.143 HBD
payout0.288 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
total payout value0.144 HBD
Transaction InfoBlock #44343128/Virtual Operation 4294967295:8
View Raw JSON Data
{
  "block": 44343128,
  "op": [
    "comment_reward",
    {
      "author": "cryptopossible",
      "author_rewards": 576,
      "beneficiary_payout_value": "0.000 HBD",
      "curator_payout_value": "0.143 HBD",
      "payout": "0.288 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "total_payout_value": "0.144 HBD"
    }
  ],
  "op_in_trx": 8,
  "timestamp": "2020-06-16T13:24:33",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/16 13:24:33
authorcryptopossible
curators vesting payout1108.534924 VESTS
hbd payout0.072 HBD
hive payout0.000 HIVE
payout must be claimedtrue
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
vesting payout560.101856 VESTS
Transaction InfoBlock #44343128/Virtual Operation 4294967295:7
View Raw JSON Data
{
  "block": 44343128,
  "op": [
    "author_reward",
    {
      "author": "cryptopossible",
      "curators_vesting_payout": "1108.534924 VESTS",
      "hbd_payout": "0.072 HBD",
      "hive_payout": "0.000 HIVE",
      "payout_must_be_claimed": true,
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "vesting_payout": "560.101856 VESTS"
    }
  ],
  "op_in_trx": 7,
  "timestamp": "2020-06-16T13:24:33",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/14 09:07:48
authorhivebuzz
body<center>[![](https://images.hive.blog/175x175/http://hivebuzz.me/@cryptopossible/level.png?202006140849)](https://hivebuzz.me/@cryptopossible) <center>@cryptopossible, sorry to see you have less Hive Power. Your level lowered and you are now a **Red Fish**!</center> ###### Support the HiveBuzz project. [Vote](https://hivesigner.com/sign/update_proposal_votes?proposal_ids=%5B%22109%22%5D&approve=true) for [our proposal](https://peakd.com/me/proposals/109)!
json metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
parent authorcryptopossible
parent permlinkdeep-learning-neural-networks-on-images-from-cifar-10
permlinkhivebuzz-notify-cryptopossible-20200614t090746000z
title
Transaction InfoBlock #44280547/Trx 7479eedecc9cdb7d9512fd781970ea0ca2090b0d
View Raw JSON Data
{
  "block": 44280547,
  "op": [
    "comment",
    {
      "author": "hivebuzz",
      "body": "<center>[![](https://images.hive.blog/175x175/http://hivebuzz.me/@cryptopossible/level.png?202006140849)](https://hivebuzz.me/@cryptopossible)\r\n<center>@cryptopossible, sorry to see you have less Hive Power.\r\nYour level lowered and you are now a **Red Fish**!</center>\n\n###### Support the HiveBuzz project. [Vote](https://hivesigner.com/sign/update_proposal_votes?proposal_ids=%5B%22109%22%5D&approve=true) for [our proposal](https://peakd.com/me/proposals/109)!",
      "json_metadata": "{\"image\":[\"http://hivebuzz.me/notify.t6.png\"]}",
      "parent_author": "cryptopossible",
      "parent_permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "permlink": "hivebuzz-notify-cryptopossible-20200614t090746000z",
      "title": ""
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-14T09:07:48",
  "trx_id": "7479eedecc9cdb7d9512fd781970ea0ca2090b0d",
  "trx_in_block": 15,
  "virtual_op": false
}
cryptopossiblereceived 75.783 HIVE from power down installment (90.803 HP)
2020/06/14 08:17:42
deposited75.783 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #44279547/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44279547,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.783 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-14T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossibleclaimed reward balance: 0.125 HBD, 0.621 HP
2020/06/12 13:43:27
accountcryptopossible
reward hbd0.125 HBD
reward hive0.000 HIVE
reward vests1008.401419 VESTS
Transaction InfoBlock #44228589/Trx ec1dd81ab320d615d1950a7e1bfb463b4093d772
View Raw JSON Data
{
  "block": 44228589,
  "op": [
    "claim_reward_balance",
    {
      "account": "cryptopossible",
      "reward_hbd": "0.125 HBD",
      "reward_hive": "0.000 HIVE",
      "reward_vests": "1008.401419 VESTS"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:43:27",
  "trx_id": "ec1dd81ab320d615d1950a7e1bfb463b4093d772",
  "trx_in_block": 6,
  "virtual_op": false
}
2020/06/12 13:38:48
authorcryptopossible
pending payout0.026 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
rshares199261603
total vote weight48524
votercurbot
weight97 (0.97%)
Transaction InfoBlock #44228496/Trx 975962eddbce0af00f82e0dcaf63bf16f3ba25ac
View Raw JSON Data
{
  "block": 44228496,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.026 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "rshares": 199261603,
      "total_vote_weight": 48524,
      "voter": "curbot",
      "weight": 97
    }
  ],
  "op_in_trx": 3,
  "timestamp": "2020-06-12T13:38:48",
  "trx_id": "975962eddbce0af00f82e0dcaf63bf16f3ba25ac",
  "trx_in_block": 25,
  "virtual_op": true
}
2020/06/12 13:38:48
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
votercurbot
weight1000 (10.00%)
Transaction InfoBlock #44228496/Trx 975962eddbce0af00f82e0dcaf63bf16f3ba25ac
View Raw JSON Data
{
  "block": 44228496,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "voter": "curbot",
      "weight": 1000
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-12T13:38:48",
  "trx_id": "975962eddbce0af00f82e0dcaf63bf16f3ba25ac",
  "trx_in_block": 25,
  "virtual_op": false
}
2020/06/12 13:38:45
authorcryptopossible
pending payout0.026 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
rshares81613550235
total vote weight48427
voterdigital.mine
weight39809
Transaction InfoBlock #44228495/Trx 245716b9acd6a1fe4cfb1aa6b9dd9b330faab078
View Raw JSON Data
{
  "block": 44228495,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.026 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "rshares": 81613550235,
      "total_vote_weight": 48427,
      "voter": "digital.mine",
      "weight": 39809
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-12T13:38:45",
  "trx_id": "245716b9acd6a1fe4cfb1aa6b9dd9b330faab078",
  "trx_in_block": 22,
  "virtual_op": true
}
2020/06/12 13:38:45
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
voterdigital.mine
weight40 (0.40%)
Transaction InfoBlock #44228495/Trx 245716b9acd6a1fe4cfb1aa6b9dd9b330faab078
View Raw JSON Data
{
  "block": 44228495,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "voter": "digital.mine",
      "weight": 40
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:38:45",
  "trx_id": "245716b9acd6a1fe4cfb1aa6b9dd9b330faab078",
  "trx_in_block": 22,
  "virtual_op": false
}
2020/06/12 13:38:36
authorcryptopossible
pending payout0.004 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
rshares155605522
total vote weight8215
voterhf19
weight73 (0.73%)
Transaction InfoBlock #44228492/Trx 023c293f1384c1308e535c19050f5abc3aeebd78
View Raw JSON Data
{
  "block": 44228492,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.004 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "rshares": 155605522,
      "total_vote_weight": 8215,
      "voter": "hf19",
      "weight": 73
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-12T13:38:36",
  "trx_id": "023c293f1384c1308e535c19050f5abc3aeebd78",
  "trx_in_block": 74,
  "virtual_op": true
}
2020/06/12 13:38:36
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
voterhf19
weight10000 (100.00%)
Transaction InfoBlock #44228492/Trx 023c293f1384c1308e535c19050f5abc3aeebd78
View Raw JSON Data
{
  "block": 44228492,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "voter": "hf19",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:38:36",
  "trx_id": "023c293f1384c1308e535c19050f5abc3aeebd78",
  "trx_in_block": 74,
  "virtual_op": false
}
2020/06/12 13:37:54
authorcryptopossible
pending payout0.004 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
rshares1276682799
total vote weight8138
voterbesheda
weight520 (5.20%)
Transaction InfoBlock #44228478/Trx 488b8b832fa5e362a3838d66088bf115b49cf2f2
View Raw JSON Data
{
  "block": 44228478,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.004 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "rshares": 1276682799,
      "total_vote_weight": 8138,
      "voter": "besheda",
      "weight": 520
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-12T13:37:54",
  "trx_id": "488b8b832fa5e362a3838d66088bf115b49cf2f2",
  "trx_in_block": 48,
  "virtual_op": true
}
2020/06/12 13:37:54
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
voterbesheda
weight4300 (43.00%)
Transaction InfoBlock #44228478/Trx 488b8b832fa5e362a3838d66088bf115b49cf2f2
View Raw JSON Data
{
  "block": 44228478,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "voter": "besheda",
      "weight": 4300
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:37:54",
  "trx_id": "488b8b832fa5e362a3838d66088bf115b49cf2f2",
  "trx_in_block": 48,
  "virtual_op": false
}
2020/06/12 13:37:24
authorcryptopossible
pending payout0.004 HBD
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
rshares15050281440
total vote weight7503
voterdiscernente
weight5402 (54.02%)
Transaction InfoBlock #44228468/Trx 58a1251fcd206508c54e3efea6dd7fa52966c9cf
View Raw JSON Data
{
  "block": 44228468,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.004 HBD",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "rshares": 15050281440,
      "total_vote_weight": 7503,
      "voter": "discernente",
      "weight": 5402
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-12T13:37:24",
  "trx_id": "58a1251fcd206508c54e3efea6dd7fa52966c9cf",
  "trx_in_block": 23,
  "virtual_op": true
}
2020/06/12 13:37:24
authorcryptopossible
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
voterdiscernente
weight200 (2.00%)
Transaction InfoBlock #44228468/Trx 58a1251fcd206508c54e3efea6dd7fa52966c9cf
View Raw JSON Data
{
  "block": 44228468,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "voter": "discernente",
      "weight": 200
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:37:24",
  "trx_id": "58a1251fcd206508c54e3efea6dd7fa52966c9cf",
  "trx_in_block": 23,
  "virtual_op": false
}
cryptopossiblecustom json: follow
2020/06/12 13:33:57
idfollow
json["reblog",{"account":"cryptopossible","author":"cryptopossible","permlink":"deep-learning-neural-networks-on-images-from-cifar-10"}]
required auths[]
required posting auths["cryptopossible"]
Transaction InfoBlock #44228399/Trx 003219346636cab9b32bb6dda79a55800dcb006d
View Raw JSON Data
{
  "block": 44228399,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"reblog\",{\"account\":\"cryptopossible\",\"author\":\"cryptopossible\",\"permlink\":\"deep-learning-neural-networks-on-images-from-cifar-10\"}]",
      "required_auths": [],
      "required_posting_auths": [
        "cryptopossible"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:33:57",
  "trx_id": "003219346636cab9b32bb6dda79a55800dcb006d",
  "trx_in_block": 12,
  "virtual_op": false
}
2020/06/12 13:33:48
authorcryptopossible
body<iframe width="560" height="315" src="https://www.youtube.com/embed/9suSsTVhYuw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> Neural Network is a tool which is used in Deep Learning. This tool uses a combination of linear and non-linear functions to make highly accurate predictions. For training our model, this combination of functions is used multiple times to cycle through the data. It can be used for predictions on regression or classification problems. <iframe width="560" height="315" src="https://www.youtube.com/embed/xYJEM2C0G5Q" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> How we utilize the available data will depend on whether we are solving a regression or classification problem. Here our data consists of images and our task is to make a neural network to identify these images. ``` import torch import torchvision import numpy as np import matplotlib.pyplot as plt import torch.nn as nn import torch.nn.functional as F from torchvision.datasets import CIFAR10 from torchvision.transforms import ToTensor from torchvision.utils import make_grid from torch.utils.data.dataloader import DataLoader from torch.utils.data import random_split %matplotlib inline ``` ``` # Project name used for jovian.commit project_name = '03-cifar10-feedforward' ``` ``` dataset = CIFAR10(root='data/', download=True, transform=ToTensor()) test_dataset = CIFAR10(root='data/', train=False, transform=ToTensor()) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/ipelgx0J-image.png) ``` dataset_size = len(dataset) dataset_size ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/nK4Gh2LE-image.png) ``` test_dataset_size = len(test_dataset) test_dataset_size ``` ``` classes = dataset.classes classes ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/yyzxAqcr-image.png) ``` img, label = dataset[0] img_shape = img.shape img_shape ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/z51CPqg0-image.png) ``` a = {} for image,label in dataset: num_label = classes[label] if num_label not in a: a[num_label] = 0 a[num_label] += 1 a ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/khLhkpvF-image.png) We begin by importing the PyTorch packages and modules. Here we need to download the CIFAR-10 dataset. We loop through the data to determine the number of images for each object (class). ``` torch.manual_seed(43) val_size = 5000 train_size = len(dataset) - val_size ``` ``` train_ds, val_ds = random_split(dataset, [train_size, val_size]) len(train_ds), len(val_ds) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/tf9hEsTC-image.png) ``` batch_size=128 ``` ``` train_loader = DataLoader(train_ds, batch_size, shuffle=True, num_workers=4, pin_memory=True) val_loader = DataLoader(val_ds, batch_size*2, num_workers=4, pin_memory=True) test_loader = DataLoader(test_dataset, batch_size*2, num_workers=4, pin_memory=True) ``` In this step, we split the data and then create DataLoader for batches of data. We have written a function to predict accuracy. ``` def accuracy(outputs, labels): _, preds = torch.max(outputs, dim=1) return torch.tensor(torch.sum(preds == labels).item() / len(preds)) ``` ``` class ImageClassificationBase(nn.Module): def training_step(self, batch): images, labels = batch out = self(images) # Generate predictions loss = F.cross_entropy(out, labels) # Calculate loss return loss def validation_step(self, batch): images, labels = batch out = self(images) # Generate predictions loss = F.cross_entropy(out, labels) # Calculate loss acc = accuracy(out, labels) # Calculate accuracy return {'val_loss': loss.detach(), 'val_acc': acc} def validation_epoch_end(self, outputs): batch_losses = [x['val_loss'] for x in outputs] epoch_loss = torch.stack(batch_losses).mean() # Combine losses batch_accs = [x['val_acc'] for x in outputs] epoch_acc = torch.stack(batch_accs).mean() # Combine accuracies return {'val_loss': epoch_loss.item(), 'val_acc': epoch_acc.item()} def epoch_end(self, epoch, result): print("Epoch [{}], val_loss: {:.4f}, val_acc: {:.4f}".format(epoch, result['val_loss'], result['val_acc'])) ``` ``` def evaluate(model, val_loader): outputs = [model.validation_step(batch) for batch in val_loader] return model.validation_epoch_end(outputs) def fit(epochs, lr, model, train_loader, val_loader, opt_func=torch.optim.SGD): history = [] optimizer = opt_func(model.parameters(), lr) for epoch in range(epochs): # Training Phase for batch in train_loader: loss = model.training_step(batch) loss.backward() optimizer.step() optimizer.zero_grad() # Validation phase result = evaluate(model, val_loader) model.epoch_end(epoch, result) history.append(result) return history ``` For this step, we begin training our model. Here we have written functions to make predictions and evaluate the accuracy. ``` torch.cuda.is_available() ``` ``` def get_default_device(): """Pick GPU if available, else CPU""" if torch.cuda.is_available(): return torch.device('cuda') else: return torch.device('cpu') ``` ``` device = get_default_device() device ``` ``` def to_device(data, device): """Move tensor(s) to chosen device""" if isinstance(data, (list,tuple)): return [to_device(x, device) for x in data] return data.to(device, non_blocking=True) class DeviceDataLoader(): """Wrap a dataloader to move data to a device""" def __init__(self, dl, device): self.dl = dl self.device = device def __iter__(self): """Yield a batch of data after moving it to device""" for b in self.dl: yield to_device(b, self.device) def __len__(self): """Number of batches""" return len(self.dl) ``` ``` train_loader = DeviceDataLoader(train_loader, device) val_loader = DeviceDataLoader(val_loader, device) test_loader = DeviceDataLoader(test_loader, device) ``` ``` input_size = 3*32*32 output_size = 10 ``` ``` class CIFAR10Model(ImageClassificationBase): def __init__(self): super().__init__() self.linear1 = nn.Linear(input_size, 1792) self.linear2 = nn.Linear(1792, 896) self.linear3 = nn.Linear(896, 448) self.linear4 = nn.Linear(448, output_size) def forward(self, xb): # Flatten images into vectors out = xb.view(xb.size(0), -1) # Apply layers & activation functions out = self.linear1(out) out = F.relu(out) out = self.linear2(out) out = F.relu(out) out = self.linear3(out) out = F.relu(out) out = self.linear4(out) return out ``` Neural Network models need a Graphics Processing Unit (GPU) for making predictions.Therefore, we have written functions to use the GPU. We have also added different linear and non-linear (activation) functions to our model. ``` model = to_device(CIFAR10Model(), device) ``` ``` history += fit(45, 0.004, model, train_loader, val_loader) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/qjLGMdU3-image.png) ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/zCQel88o-image.png) This step helped in predicting the accuracy of our model. This model achieved about 52% accuracy. To view my Jupyter notebook [click here](https://jovian.ml/oneworldcoder/03-cifar10-feedforward) Next week, we will learn how to increase accuracy! **References** [*Deep Learning with PyTorch:Zero to GAN's**](https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622?u=oneworldcoder) by [Aakash N S](https://jovian.ml/forum/u/aakashns/summary) [*But what is Neural Network?*](https://youtu.be/aircAruvnKk) By [3Blue1Brown](https://www.3blue1brown.com/) [*CIFAR-10* Dataset](https://jovian.ml/outlink?url=https%3A%2F%2Fwww.cs.toronto.edu%2F~kriz%2Fcifar.html)
json metadata{"app":"peakd/2020.05.5","format":"markdown","description":"Code in Deep Neural Networks for images from CIFAR-10.","tags":["ai","code","deeplearning","pytorch","python","nn","neuralnetworks","beginner"],"links":["https://jovian.ml/oneworldcoder/03-cifar10-feedforward","https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622?u=oneworldcoder","https://jovian.ml/forum/u/aakashns/summary","https://youtu.be/aircAruvnKk","https://www.3blue1brown.com/","https://jovian.ml/outlink?url=https%3A%2F%2Fwww.cs.toronto.edu%2F~kriz%2Fcifar.html"],"image":["https://files.peakd.com/file/peakd-hive/cryptopossible/ipelgx0J-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/nK4Gh2LE-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/yyzxAqcr-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/z51CPqg0-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/khLhkpvF-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/tf9hEsTC-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/qjLGMdU3-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/zCQel88o-image.png"]}
parent author
parent permlinkhive-174578
permlinkdeep-learning-neural-networks-on-images-from-cifar-10
titleDeep Learning: Neural networks on images from CIFAR-10.
Transaction InfoBlock #44228396/Trx 4372a62621ad34b3687cbf38910caaa0777a05fb
View Raw JSON Data
{
  "block": 44228396,
  "op": [
    "comment",
    {
      "author": "cryptopossible",
      "body": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/9suSsTVhYuw\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe> \n\nNeural Network is a tool which is used in Deep Learning. This tool uses a combination of linear and non-linear functions to make highly accurate predictions. For training our model, this combination of functions is used multiple times to cycle through the data.  It can be used for predictions on regression or classification problems.  \n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/xYJEM2C0G5Q\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe> \n\nHow we utilize the available data will depend on whether we are solving a regression or classification problem.\n\nHere our data consists of images and our task is to make a neural network to identify these images.\n\n```\nimport torch\nimport torchvision\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchvision.datasets import CIFAR10\nfrom torchvision.transforms import ToTensor\nfrom torchvision.utils import make_grid\nfrom torch.utils.data.dataloader import DataLoader\nfrom torch.utils.data import random_split\n%matplotlib inline\n```\n```\n# Project name used for jovian.commit\nproject_name = '03-cifar10-feedforward'\n```\n```\ndataset = CIFAR10(root='data/', download=True, transform=ToTensor())\ntest_dataset = CIFAR10(root='data/', train=False, transform=ToTensor())\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/ipelgx0J-image.png)\n\n```\ndataset_size = len(dataset)\ndataset_size\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/nK4Gh2LE-image.png)\n\n```\ntest_dataset_size = len(test_dataset)\ntest_dataset_size\n```\n```\nclasses = dataset.classes\nclasses\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/yyzxAqcr-image.png)\n```\nimg, label = dataset[0]\nimg_shape = img.shape\nimg_shape\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/z51CPqg0-image.png)\n\n```\na = {}\n\n\nfor image,label in dataset:\n    num_label = classes[label]\n    if num_label not in a:\n        a[num_label] = 0\n    a[num_label] += 1\n\na\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/khLhkpvF-image.png)\n\n\n\nWe begin by importing the PyTorch packages and modules. Here we need to download the CIFAR-10 dataset. We loop through the data to determine the number of images for each object (class).\n```\ntorch.manual_seed(43)\nval_size = 5000\ntrain_size = len(dataset) - val_size\n```\n```\ntrain_ds, val_ds = random_split(dataset, [train_size, val_size])\nlen(train_ds), len(val_ds)\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/tf9hEsTC-image.png)\n\n```\nbatch_size=128\n```\n```\ntrain_loader = DataLoader(train_ds, batch_size, shuffle=True, num_workers=4, pin_memory=True)\nval_loader = DataLoader(val_ds, batch_size*2, num_workers=4, pin_memory=True)\ntest_loader = DataLoader(test_dataset, batch_size*2, num_workers=4, pin_memory=True)\n```\n\n\nIn this step, we split the data and then create DataLoader for batches of data. We have written a function to predict accuracy.\n\n\n```\ndef accuracy(outputs, labels):\n    _, preds = torch.max(outputs, dim=1)\n    return torch.tensor(torch.sum(preds == labels).item() / len(preds))\n```\n```\nclass ImageClassificationBase(nn.Module):\n    def training_step(self, batch):\n        images, labels = batch \n        out = self(images)                  # Generate predictions\n        loss = F.cross_entropy(out, labels) # Calculate loss\n        return loss\n    \n    def validation_step(self, batch):\n        images, labels = batch \n        out = self(images)                    # Generate predictions\n        loss = F.cross_entropy(out, labels)   # Calculate loss\n        acc = accuracy(out, labels)           # Calculate accuracy\n        return {'val_loss': loss.detach(), 'val_acc': acc}\n        \n    def validation_epoch_end(self, outputs):\n        batch_losses = [x['val_loss'] for x in outputs]\n        epoch_loss = torch.stack(batch_losses).mean()   # Combine losses\n        batch_accs = [x['val_acc'] for x in outputs]\n        epoch_acc = torch.stack(batch_accs).mean()      # Combine accuracies\n        return {'val_loss': epoch_loss.item(), 'val_acc': epoch_acc.item()}\n    \n    def epoch_end(self, epoch, result):\n        print(\"Epoch [{}], val_loss: {:.4f}, val_acc: {:.4f}\".format(epoch, result['val_loss'], result['val_acc']))\n```\n```\ndef evaluate(model, val_loader):\n    outputs = [model.validation_step(batch) for batch in val_loader]\n    return model.validation_epoch_end(outputs)\n\ndef fit(epochs, lr, model, train_loader, val_loader, opt_func=torch.optim.SGD):\n    history = []\n    optimizer = opt_func(model.parameters(), lr)\n    for epoch in range(epochs):\n        # Training Phase \n        for batch in train_loader:\n            loss = model.training_step(batch)\n            loss.backward()\n            optimizer.step()\n            optimizer.zero_grad()\n        # Validation phase\n        result = evaluate(model, val_loader)\n        model.epoch_end(epoch, result)\n        history.append(result)\n    return history\n```\n\n\nFor this step, we begin training  our model. Here we have written functions to make predictions and evaluate the accuracy.\n\n```\ntorch.cuda.is_available()\n```\n```\ndef get_default_device():\n    \"\"\"Pick GPU if available, else CPU\"\"\"\n    if torch.cuda.is_available():\n        return torch.device('cuda')\n    else:\n        return torch.device('cpu')\n```\n```\ndevice = get_default_device()\ndevice\n```\n```\ndef to_device(data, device):\n    \"\"\"Move tensor(s) to chosen device\"\"\"\n    if isinstance(data, (list,tuple)):\n        return [to_device(x, device) for x in data]\n    return data.to(device, non_blocking=True)\n\nclass DeviceDataLoader():\n    \"\"\"Wrap a dataloader to move data to a device\"\"\"\n    def __init__(self, dl, device):\n        self.dl = dl\n        self.device = device\n        \n    def __iter__(self):\n        \"\"\"Yield a batch of data after moving it to device\"\"\"\n        for b in self.dl: \n            yield to_device(b, self.device)\n\n    def __len__(self):\n        \"\"\"Number of batches\"\"\"\n        return len(self.dl)\n```\n```\ntrain_loader = DeviceDataLoader(train_loader, device)\nval_loader = DeviceDataLoader(val_loader, device)\ntest_loader = DeviceDataLoader(test_loader, device)\n```\n```\ninput_size = 3*32*32\noutput_size = 10\n```\n```\nclass CIFAR10Model(ImageClassificationBase):\n    def __init__(self):\n        super().__init__()\n        self.linear1 = nn.Linear(input_size, 1792)\n        self.linear2 = nn.Linear(1792, 896)\n        self.linear3 = nn.Linear(896, 448)\n        self.linear4 = nn.Linear(448, output_size)\n        \n        \n    def forward(self, xb):\n        # Flatten images into vectors\n        out = xb.view(xb.size(0), -1)\n        # Apply layers & activation functions\n        out = self.linear1(out)\n        out = F.relu(out)\n        out = self.linear2(out)\n        out = F.relu(out)\n        out = self.linear3(out)\n        out = F.relu(out)\n        out = self.linear4(out)\n        return out\n```\n\nNeural Network models need a Graphics Processing Unit (GPU) for making predictions.Therefore, we have written functions to use the GPU. We have also added different linear and non-linear (activation) functions to our model.\n\n```\nmodel = to_device(CIFAR10Model(), device)\n```\n```\nhistory += fit(45, 0.004, model, train_loader, val_loader)\n```\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/qjLGMdU3-image.png)\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/zCQel88o-image.png)\n\n\nThis step helped in predicting the accuracy of our model. This model achieved about 52% accuracy. To view my Jupyter notebook [click here](https://jovian.ml/oneworldcoder/03-cifar10-feedforward) Next week, we will learn how to increase accuracy!\n\n**References**\n[*Deep Learning with PyTorch:Zero to GAN's**](https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622?u=oneworldcoder) by [Aakash N S](https://jovian.ml/forum/u/aakashns/summary)\n[*But what is Neural Network?*](https://youtu.be/aircAruvnKk)  By [3Blue1Brown](https://www.3blue1brown.com/)\n[*CIFAR-10* Dataset](https://jovian.ml/outlink?url=https%3A%2F%2Fwww.cs.toronto.edu%2F~kriz%2Fcifar.html)\n",
      "json_metadata": "{\"app\":\"peakd/2020.05.5\",\"format\":\"markdown\",\"description\":\"Code in Deep Neural Networks for images from CIFAR-10.\",\"tags\":[\"ai\",\"code\",\"deeplearning\",\"pytorch\",\"python\",\"nn\",\"neuralnetworks\",\"beginner\"],\"links\":[\"https://jovian.ml/oneworldcoder/03-cifar10-feedforward\",\"https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622?u=oneworldcoder\",\"https://jovian.ml/forum/u/aakashns/summary\",\"https://youtu.be/aircAruvnKk\",\"https://www.3blue1brown.com/\",\"https://jovian.ml/outlink?url=https%3A%2F%2Fwww.cs.toronto.edu%2F~kriz%2Fcifar.html\"],\"image\":[\"https://files.peakd.com/file/peakd-hive/cryptopossible/ipelgx0J-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/nK4Gh2LE-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/yyzxAqcr-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/z51CPqg0-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/khLhkpvF-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/tf9hEsTC-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/qjLGMdU3-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/zCQel88o-image.png\"]}",
      "parent_author": "",
      "parent_permlink": "hive-174578",
      "permlink": "deep-learning-neural-networks-on-images-from-cifar-10",
      "title": "Deep Learning: Neural networks on images from CIFAR-10."
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-12T13:33:48",
  "trx_id": "4372a62621ad34b3687cbf38910caaa0777a05fb",
  "trx_in_block": 27,
  "virtual_op": false
}
2020/06/09 13:47:42
authorcryptopossible
pending payout0.294 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares1554563223
total vote weight434828
voternew-steemit
weight624 (6.24%)
Transaction InfoBlock #44142494/Trx 28a5a40629e2387d04cab431f92202670e1fccf4
View Raw JSON Data
{
  "block": 44142494,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.294 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 1554563223,
      "total_vote_weight": 434828,
      "voter": "new-steemit",
      "weight": 624
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:47:42",
  "trx_id": "28a5a40629e2387d04cab431f92202670e1fccf4",
  "trx_in_block": 19,
  "virtual_op": true
}
2020/06/09 13:47:42
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voternew-steemit
weight200 (2.00%)
Transaction InfoBlock #44142494/Trx 28a5a40629e2387d04cab431f92202670e1fccf4
View Raw JSON Data
{
  "block": 44142494,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "new-steemit",
      "weight": 200
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:47:42",
  "trx_id": "28a5a40629e2387d04cab431f92202670e1fccf4",
  "trx_in_block": 19,
  "virtual_op": false
}
2020/06/09 13:47:39
authorcryptopossible
pending payout0.293 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares754495326654
total vote weight434204
voterpayroll
weight329371
Transaction InfoBlock #44142493/Trx 2645acff000529162c783935530c9f8f532e6b1b
View Raw JSON Data
{
  "block": 44142493,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.293 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 754495326654,
      "total_vote_weight": 434204,
      "voter": "payroll",
      "weight": 329371
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:47:39",
  "trx_id": "2645acff000529162c783935530c9f8f532e6b1b",
  "trx_in_block": 8,
  "virtual_op": true
}
2020/06/09 13:47:39
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voterpayroll
weight200 (2.00%)
Transaction InfoBlock #44142493/Trx 2645acff000529162c783935530c9f8f532e6b1b
View Raw JSON Data
{
  "block": 44142493,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "payroll",
      "weight": 200
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:47:39",
  "trx_id": "2645acff000529162c783935530c9f8f532e6b1b",
  "trx_in_block": 8,
  "virtual_op": false
}
2020/06/09 13:36:42
authorcryptopossible
pending payout0.060 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares199010042
total vote weight104833
votercurbot
weight94 (0.94%)
Transaction InfoBlock #44142275/Trx dcfbe45c97096588242c5c10eef46c61df5d0f0c
View Raw JSON Data
{
  "block": 44142275,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.060 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 199010042,
      "total_vote_weight": 104833,
      "voter": "curbot",
      "weight": 94
    }
  ],
  "op_in_trx": 3,
  "timestamp": "2020-06-09T13:36:42",
  "trx_id": "dcfbe45c97096588242c5c10eef46c61df5d0f0c",
  "trx_in_block": 10,
  "virtual_op": true
}
2020/06/09 13:36:42
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
votercurbot
weight1000 (10.00%)
Transaction InfoBlock #44142275/Trx dcfbe45c97096588242c5c10eef46c61df5d0f0c
View Raw JSON Data
{
  "block": 44142275,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "curbot",
      "weight": 1000
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-09T13:36:42",
  "trx_id": "dcfbe45c97096588242c5c10eef46c61df5d0f0c",
  "trx_in_block": 10,
  "virtual_op": false
}
2020/06/09 13:31:12
authorcryptopossible
pending payout0.060 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares2618022469
total vote weight104739
votercizolf
weight1243 (12.43%)
Transaction InfoBlock #44142165/Trx 4109a6d0a84148f9b15c52b18b76ecf728a85732
View Raw JSON Data
{
  "block": 44142165,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.060 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 2618022469,
      "total_vote_weight": 104739,
      "voter": "cizolf",
      "weight": 1243
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:31:12",
  "trx_id": "4109a6d0a84148f9b15c52b18b76ecf728a85732",
  "trx_in_block": 2,
  "virtual_op": true
}
2020/06/09 13:31:12
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
votercizolf
weight10000 (100.00%)
Transaction InfoBlock #44142165/Trx 4109a6d0a84148f9b15c52b18b76ecf728a85732
View Raw JSON Data
{
  "block": 44142165,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "cizolf",
      "weight": 10000
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:31:12",
  "trx_id": "4109a6d0a84148f9b15c52b18b76ecf728a85732",
  "trx_in_block": 2,
  "virtual_op": false
}
2020/06/09 13:30:30
authorcryptopossible
pending payout0.059 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares310775962
total vote weight103496
votermerlion
weight148 (1.48%)
Transaction InfoBlock #44142151/Trx 92a6f9456798766a48a12c11aeb1a5cbed3d09cd
View Raw JSON Data
{
  "block": 44142151,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.059 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 310775962,
      "total_vote_weight": 103496,
      "voter": "merlion",
      "weight": 148
    }
  ],
  "op_in_trx": 3,
  "timestamp": "2020-06-09T13:30:30",
  "trx_id": "92a6f9456798766a48a12c11aeb1a5cbed3d09cd",
  "trx_in_block": 19,
  "virtual_op": true
}
2020/06/09 13:30:30
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
votermerlion
weight100 (1.00%)
Transaction InfoBlock #44142151/Trx 92a6f9456798766a48a12c11aeb1a5cbed3d09cd
View Raw JSON Data
{
  "block": 44142151,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "merlion",
      "weight": 100
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-09T13:30:30",
  "trx_id": "92a6f9456798766a48a12c11aeb1a5cbed3d09cd",
  "trx_in_block": 19,
  "virtual_op": false
}
2020/06/09 13:30:30
authorcryptopossible
pending payout0.059 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares21071982
total vote weight103348
voterhungrybear
weight10 (0.10%)
Transaction InfoBlock #44142151/Trx 92a6f9456798766a48a12c11aeb1a5cbed3d09cd
View Raw JSON Data
{
  "block": 44142151,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.059 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 21071982,
      "total_vote_weight": 103348,
      "voter": "hungrybear",
      "weight": 10
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:30:30",
  "trx_id": "92a6f9456798766a48a12c11aeb1a5cbed3d09cd",
  "trx_in_block": 19,
  "virtual_op": true
}
2020/06/09 13:30:30
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voterhungrybear
weight100 (1.00%)
Transaction InfoBlock #44142151/Trx 92a6f9456798766a48a12c11aeb1a5cbed3d09cd
View Raw JSON Data
{
  "block": 44142151,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "hungrybear",
      "weight": 100
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:30:30",
  "trx_id": "92a6f9456798766a48a12c11aeb1a5cbed3d09cd",
  "trx_in_block": 19,
  "virtual_op": false
}
2020/06/09 13:30:03
authorcryptopossible
pending payout0.059 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares2321725717
total vote weight103338
voteronepercentbetter
weight1103 (11.03%)
Transaction InfoBlock #44142142/Trx ebe2655e71041a4df4cac59777ae987a7cbe1425
View Raw JSON Data
{
  "block": 44142142,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.059 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 2321725717,
      "total_vote_weight": 103338,
      "voter": "onepercentbetter",
      "weight": 1103
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:30:03",
  "trx_id": "ebe2655e71041a4df4cac59777ae987a7cbe1425",
  "trx_in_block": 23,
  "virtual_op": true
}
2020/06/09 13:30:03
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voteronepercentbetter
weight100 (1.00%)
Transaction InfoBlock #44142142/Trx ebe2655e71041a4df4cac59777ae987a7cbe1425
View Raw JSON Data
{
  "block": 44142142,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "onepercentbetter",
      "weight": 100
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:30:03",
  "trx_id": "ebe2655e71041a4df4cac59777ae987a7cbe1425",
  "trx_in_block": 23,
  "virtual_op": false
}
2020/06/09 13:29:39
authorcryptopossible
pending payout0.058 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares98480965359
total vote weight102235
voterctime
weight47359
Transaction InfoBlock #44142134/Trx 80a2626e11e9ac34ad831c4764159195fdcb6272
View Raw JSON Data
{
  "block": 44142134,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.058 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 98480965359,
      "total_vote_weight": 102235,
      "voter": "ctime",
      "weight": 47359
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:29:39",
  "trx_id": "80a2626e11e9ac34ad831c4764159195fdcb6272",
  "trx_in_block": 36,
  "virtual_op": true
}
2020/06/09 13:29:39
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voterctime
weight100 (1.00%)
Transaction InfoBlock #44142134/Trx 80a2626e11e9ac34ad831c4764159195fdcb6272
View Raw JSON Data
{
  "block": 44142134,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "ctime",
      "weight": 100
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:29:39",
  "trx_id": "80a2626e11e9ac34ad831c4764159195fdcb6272",
  "trx_in_block": 36,
  "virtual_op": false
}
2020/06/09 13:29:39
authorcryptopossible
pending payout0.030 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares110180997663
total vote weight54876
voterdigital.mine
weight54301
Transaction InfoBlock #44142134/Trx 942a0d59e970638cb29414c82a31c052d04c1aca
View Raw JSON Data
{
  "block": 44142134,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.030 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 110180997663,
      "total_vote_weight": 54876,
      "voter": "digital.mine",
      "weight": 54301
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:29:39",
  "trx_id": "942a0d59e970638cb29414c82a31c052d04c1aca",
  "trx_in_block": 33,
  "virtual_op": true
}
2020/06/09 13:29:39
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voterdigital.mine
weight50 (0.50%)
Transaction InfoBlock #44142134/Trx 942a0d59e970638cb29414c82a31c052d04c1aca
View Raw JSON Data
{
  "block": 44142134,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "digital.mine",
      "weight": 50
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:29:39",
  "trx_id": "942a0d59e970638cb29414c82a31c052d04c1aca",
  "trx_in_block": 33,
  "virtual_op": false
}
2020/06/09 13:28:42
authorcryptopossible
pending payout0.000 HBD
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
rshares1152168268
total vote weight575
voterbesheda
weight471 (4.71%)
Transaction InfoBlock #44142115/Trx fb5b8819613577f3907da9899c97734633e276b0
View Raw JSON Data
{
  "block": 44142115,
  "op": [
    "effective_comment_vote",
    {
      "author": "cryptopossible",
      "pending_payout": "0.000 HBD",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "rshares": 1152168268,
      "total_vote_weight": 575,
      "voter": "besheda",
      "weight": 471
    }
  ],
  "op_in_trx": 1,
  "timestamp": "2020-06-09T13:28:42",
  "trx_id": "fb5b8819613577f3907da9899c97734633e276b0",
  "trx_in_block": 13,
  "virtual_op": true
}
2020/06/09 13:28:42
authorcryptopossible
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
voterbesheda
weight4300 (43.00%)
Transaction InfoBlock #44142115/Trx fb5b8819613577f3907da9899c97734633e276b0
View Raw JSON Data
{
  "block": 44142115,
  "op": [
    "vote",
    {
      "author": "cryptopossible",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "voter": "besheda",
      "weight": 4300
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:28:42",
  "trx_id": "fb5b8819613577f3907da9899c97734633e276b0",
  "trx_in_block": 13,
  "virtual_op": false
}
cryptopossiblecustom json: follow
2020/06/09 13:24:48
idfollow
json["reblog",{"account":"cryptopossible","author":"cryptopossible","permlink":"deep-learning-predicting-the-average-income-of-residents-in-california"}]
required auths[]
required posting auths["cryptopossible"]
Transaction InfoBlock #44142037/Trx d705bc9b81768500df8ea9dd1fd0a0bb90b5ba2c
View Raw JSON Data
{
  "block": 44142037,
  "op": [
    "custom_json",
    {
      "id": "follow",
      "json": "[\"reblog\",{\"account\":\"cryptopossible\",\"author\":\"cryptopossible\",\"permlink\":\"deep-learning-predicting-the-average-income-of-residents-in-california\"}]",
      "required_auths": [],
      "required_posting_auths": [
        "cryptopossible"
      ]
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:24:48",
  "trx_id": "d705bc9b81768500df8ea9dd1fd0a0bb90b5ba2c",
  "trx_in_block": 7,
  "virtual_op": false
}
2020/06/09 13:24:36
authorcryptopossible
bodyWe can train the computer to predict the average income of people by considering a combination of different factors such as their residential neighbourhood, house size, house age, population of the city/town. I have written a code which can predict with about 98% accuracy the average income of residents of California. Let's discuss the code here. ``` import torch import jovian import torchvision import torch.nn as nn import pandas as pd import numpy as np import matplotlib.pyplot as plt import torch.nn.functional as F from torchvision.datasets.utils import download_url from torch.utils.data import DataLoader, TensorDataset, random_split ``` Here I am importing required PyTorch modules. ```# Hyperparameters batch_size=64 learning_rate=1e-5 # Other constants DATASET_URL = "/kaggle/input/housing.csv" DATA_FILENAME = "housing.csv" TARGET_COLUMN = 'ocean_proximity' input_size=9 output_size=1 ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/A2AZGXEm-image.png) First we need to gather as much data as possible about the residents of California. The dataset can be in .csv file. ``` def customize_dataset(dataframe_raw): dataframe = dataframe_raw.copy(deep=True) # drop some columns dataframe = dataframe.drop(['longitude', 'latitude'], axis=1) #for col in ['housing_median_age', 'total_rooms', 'total_bedrooms', 'population', # 'households', 'median_income' ,'median_house_value']: # # normalizing incoming data # dataframe[col] = (dataframe[col] - min(dataframe[col])) / (max(dataframe[col]) - min(dataframe[col])) # dropping any row that contains at least on missing value # if you dont do that, loss function will be returning nan dataframe = dataframe.dropna(axis=0) return dataframe ``` Before we begin training the model, we need to look at the data and sometimes we may need to customise the data to increase the accuracy of the result. In this case, I have excluded partially missing information in the dataset which has helped predict the accuracy. ``` dataframe = customize_dataset(dataframe) dataframe.head() ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/vJnnoXlO-image.png) ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/zU6fDFSV-image.png) ``` input_cols = list(dataframe.columns[0:4])+list(dataframe.columns[-1:]) input_cols ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/yQfGxh3y-image.png) ``` output_cols = list(dataframe.columns[5:6]) print(len(output_cols)) print(output_cols) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/7TkQOAJZ-image.png) After customising the data, we are ready to begin coding in the Jupyter notebook. Then, we segregate the data on which we will train our model. ``` # Convert from Pandas dataframe to numpy arrays def dataframe_to_arrays(dataframe): # Make a copy of the original dataframe dataframe1 = dataframe.copy(deep=True) # Convert non-numeric categorical columns to numbers for col in categorical_cols: dataframe1[col] = dataframe1[col].astype('category').cat.codes # Extract input & outupts as numpy arrays inputs_array = dataframe1[input_cols].to_numpy() targets_array = dataframe1[output_cols].to_numpy() return inputs_array, targets_array inputs_array, targets_array = dataframe_to_arrays(dataframe) inputs_array, targets_array ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/4MoomOlf-image.png) We now convert the segregated data to Numpy arrays. ``` #To convert Numpy arrays to PyTorch Tensors inputs = torch.from_numpy(inputs_array).type(torch.float32) targets = torch.from_numpy(targets_array).type(torch.float32) ``` We will be using PyTorch to train our model so we need to convert the NumPy arrays into PyTorch tensors. ``` inputs.dtype, targets.dtype dataset = TensorDataset(inputs, targets) val_percent = 0.1 # between 0.1 and 0.2 val_size = int(num_rows * val_percent) train_size = num_rows - val_size train_ds, val_ds = random_split(dataset, [train_size, val_size]) # Use the random_split function to split dataset into 2 parts of the desired length train_loader = DataLoader(train_ds, batch_size, shuffle=True) val_loader = DataLoader(val_ds, batch_size) for xb, yb in train_loader: print("inputs:", xb) print("targets:", yb) break ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/Pl5aorPs-image.png) ``` input_size = len(input_cols) output_size = len(output_cols) print(len(input_cols)) print(len(output_cols)) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/LufsjzWe-image.png) We can train our model with the data which is now in the form of PyTorch tensors. ``` class HousingModel(nn.Module): def __init__(self): super().__init__() self.linear = nn.Linear(input_size, output_size) def forward(self, xb): out = self.linear(xb) return out def training_step(self, batch): inputs, targets = batch out = self(inputs) # Generate predictions loss = F.l1_loss(out, targets) # Calculate loss return loss def validation_step(self, batch): inputs, targets = batch out = self(inputs) # Generate predictions loss = F.l1_loss(out, targets) # Calculate loss return {'val_loss': loss.detach()} def validation_epoch_end(self, outputs): batch_losses = [x['val_loss'] for x in outputs] epoch_loss = torch.stack(batch_losses).mean() # Combine losses return {'val_loss': epoch_loss.item()} def epoch_end(self, epoch, result): print("Epoch [{}], val_loss: {:.4f}".format(epoch, result['val_loss'])) model = HousingModel() def evaluate(model, val_loader): outputs = [model.validation_step(batch) for batch in val_loader] return model.validation_epoch_end(outputs) def fit(epochs, learning_rate, model, train_loader, val_loader, opt_func=torch.optim.SGD): history = [] optimizer = opt_func(model.parameters(), learning_rate) for epoch in range(epochs): # Training Phase for batch in train_loader: loss = model.training_step(batch) loss.backward() optimizer.step() optimizer.zero_grad() # Validation phase result = evaluate(model, val_loader) model.epoch_end(epoch, result) history.append(result) return history result = evaluate(model, val_loader) result ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/pQJPJBAg-image.png) ``` list(model.parameters()) ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/Jl63uEwg-image.png) Once our model is trained we can make predictions with it. ``` history2= fit(50, 1e-8, model, train_loader, val_loader, opt_func=torch.optim.SGD) history2 ``` ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/nRe9v6cX-image.png) ![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/45rEo3cU-image.png) To view the Jupyter notebook [click here](https://jovian.ml/oneworldcoder/02-housing-optional). Feel free to give me any feedback or ask questions. If you want to get into Deep Learning I highly recommend ["Deep Learning with PyTorch: Zero to GAN’s”](https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622) taught by [Aakash N S](https://jovian.ml/forum/u/aakashns/summary) of [Jovian.ml](https://www.jovian.ml/).
json metadata{"app":"peakd/2020.05.5","format":"markdown","description":"Zero to GAN's is an online certificate course that takes a hands-on coding-focused approach to deep learning.","tags":["zerotogans","jovianml","ai","deeplearning","machinelearning","ml","pytorch"],"links":["https://jovian.ml/oneworldcoder/02-housing-optional","https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622","https://jovian.ml/forum/u/aakashns/summary","https://www.jovian.ml/"],"image":["https://files.peakd.com/file/peakd-hive/cryptopossible/A2AZGXEm-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/vJnnoXlO-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/zU6fDFSV-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/yQfGxh3y-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/7TkQOAJZ-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/4MoomOlf-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/Pl5aorPs-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/LufsjzWe-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/pQJPJBAg-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/Jl63uEwg-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/nRe9v6cX-image.png","https://files.peakd.com/file/peakd-hive/cryptopossible/45rEo3cU-image.png"]}
parent author
parent permlinkhive-174578
permlinkdeep-learning-predicting-the-average-income-of-residents-in-california
titleDeep Learning: Predicting the average income of residents in California.
Transaction InfoBlock #44142033/Trx c1c6f0f2edb8c9037072ccc3a0b0b2dc064f48df
View Raw JSON Data
{
  "block": 44142033,
  "op": [
    "comment",
    {
      "author": "cryptopossible",
      "body": "We can train the computer to predict the average income of people by considering a combination of different factors such as their residential neighbourhood, house size, house age, population of the city/town. I have written a code which can predict with about 98% accuracy  the average income of residents of California.\n \nLet's discuss the code here.\n \n```\nimport torch\nimport jovian\nimport torchvision\nimport torch.nn as nn\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torch.nn.functional as F\nfrom torchvision.datasets.utils import download_url\nfrom torch.utils.data import DataLoader, TensorDataset, random_split\n\n```\n\nHere I am importing required PyTorch modules.\n\n```# Hyperparameters\nbatch_size=64\nlearning_rate=1e-5\n\n\n# Other constants\nDATASET_URL = \"/kaggle/input/housing.csv\"\nDATA_FILENAME = \"housing.csv\"\nTARGET_COLUMN = 'ocean_proximity'\ninput_size=9\noutput_size=1\n\n```\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/A2AZGXEm-image.png)\n\n \nFirst we need to gather as much data as possible about the residents of California. The dataset can be in .csv file. \n\n\n```\ndef customize_dataset(dataframe_raw):\n    dataframe = dataframe_raw.copy(deep=True)\n    # drop some columns\n    dataframe = dataframe.drop(['longitude', 'latitude'], axis=1)\n    #for col in ['housing_median_age', 'total_rooms', 'total_bedrooms', 'population', \n    #            'households', 'median_income' ,'median_house_value']:\n    #    # normalizing incoming data\n    #    dataframe[col] = (dataframe[col] - min(dataframe[col])) / (max(dataframe[col]) - min(dataframe[col]))\n    \n    # dropping any row that contains at least on missing value\n    # if you dont do that, loss function will be returning nan\n    dataframe = dataframe.dropna(axis=0)  \n    \n    return dataframe\n\n```\nBefore we begin training the model, we need to look at the data and sometimes we may need to customise the data to increase the accuracy of the result. In this case, I have excluded partially missing information in the dataset which has helped predict the accuracy.\n```\ndataframe = customize_dataset(dataframe)\n\ndataframe.head()\n```\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/vJnnoXlO-image.png)\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/zU6fDFSV-image.png)\n\n```\ninput_cols = list(dataframe.columns[0:4])+list(dataframe.columns[-1:])\n\ninput_cols\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/yQfGxh3y-image.png)\n\n```\noutput_cols = list(dataframe.columns[5:6])\nprint(len(output_cols))\nprint(output_cols)\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/7TkQOAJZ-image.png)\n\nAfter customising the data, we are ready to begin coding in the Jupyter notebook. Then, we segregate the data on which we will train our model.\n\n \n```\n# Convert from Pandas dataframe to numpy arrays\n\n\ndef dataframe_to_arrays(dataframe):\n    # Make a copy of the original dataframe\n    dataframe1 = dataframe.copy(deep=True)\n    # Convert non-numeric categorical columns to numbers\n    for col in categorical_cols:\n        dataframe1[col] = dataframe1[col].astype('category').cat.codes\n    # Extract input & outupts as numpy arrays\n    inputs_array = dataframe1[input_cols].to_numpy()\n    targets_array = dataframe1[output_cols].to_numpy()\n    return inputs_array, targets_array\n\ninputs_array, targets_array = dataframe_to_arrays(dataframe)\ninputs_array, targets_array\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/4MoomOlf-image.png)\nWe now convert the segregated data to Numpy arrays.\n\n\n```\n#To convert Numpy arrays to PyTorch Tensors\n\ninputs = torch.from_numpy(inputs_array).type(torch.float32)\ntargets = torch.from_numpy(targets_array).type(torch.float32)\n\n```\nWe will be using PyTorch to train our model so we need to convert the NumPy arrays into PyTorch tensors.\n \n```\ninputs.dtype, targets.dtype\ndataset = TensorDataset(inputs, targets)\nval_percent = 0.1 # between 0.1 and 0.2\nval_size = int(num_rows * val_percent)\ntrain_size = num_rows - val_size\n\n\ntrain_ds, val_ds = random_split(dataset, [train_size, val_size]) # Use the random_split function to split dataset into 2 parts of the desired length\n\ntrain_loader = DataLoader(train_ds, batch_size, shuffle=True)\nval_loader = DataLoader(val_ds, batch_size)\n\nfor xb, yb in train_loader:\n    print(\"inputs:\", xb)\n    print(\"targets:\", yb)\n    break\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/Pl5aorPs-image.png)\n\n```\ninput_size = len(input_cols)\noutput_size = len(output_cols)\nprint(len(input_cols))\nprint(len(output_cols))\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/LufsjzWe-image.png)\n\n\n \nWe can train our model with the data which is now in the form of PyTorch tensors.\n \n```\nclass HousingModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.linear = nn.Linear(input_size, output_size)\n        \n    def forward(self, xb):\n        out = self.linear(xb)\n        return out\n    \n    def training_step(self, batch):\n        inputs, targets = batch \n        out = self(inputs)                 # Generate predictions\n        loss = F.l1_loss(out, targets)    # Calculate loss\n        return loss\n    \n    def validation_step(self, batch):\n        inputs, targets = batch \n        out = self(inputs)                 # Generate predictions\n        loss = F.l1_loss(out, targets)    # Calculate loss\n        return {'val_loss': loss.detach()}\n        \n    def validation_epoch_end(self, outputs):\n        batch_losses = [x['val_loss'] for x in outputs]\n        epoch_loss = torch.stack(batch_losses).mean()   # Combine losses\n        return {'val_loss': epoch_loss.item()}\n    \n    def epoch_end(self, epoch, result):\n        print(\"Epoch [{}], val_loss: {:.4f}\".format(epoch, result['val_loss']))\n    \nmodel = HousingModel()\n\ndef evaluate(model, val_loader):\n    outputs = [model.validation_step(batch) for batch in val_loader]\n    return model.validation_epoch_end(outputs)\n\ndef fit(epochs, learning_rate, model, train_loader, val_loader, opt_func=torch.optim.SGD):\n    history = []\n    optimizer = opt_func(model.parameters(), learning_rate)\n    for epoch in range(epochs):\n        # Training Phase \n        for batch in train_loader:\n            loss = model.training_step(batch)\n            loss.backward()\n            optimizer.step()\n            optimizer.zero_grad()\n        # Validation phase\n        result = evaluate(model, val_loader)\n        model.epoch_end(epoch, result)\n        history.append(result)\n    return history\n\nresult = evaluate(model, val_loader)\nresult\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/pQJPJBAg-image.png)\n\n```\nlist(model.parameters())\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/Jl63uEwg-image.png)\n\n\n \nOnce our model is trained we can make predictions with it.\n\n```\nhistory2= fit(50, 1e-8, model, train_loader, val_loader, opt_func=torch.optim.SGD)\nhistory2\n\n```\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/nRe9v6cX-image.png)\n\n![image.png](https://files.peakd.com/file/peakd-hive/cryptopossible/45rEo3cU-image.png)\n\n\n \nTo view the Jupyter notebook [click here](https://jovian.ml/oneworldcoder/02-housing-optional). Feel free to give me any feedback or ask questions.\n \nIf you want to get into Deep Learning I highly recommend [\"Deep Learning with PyTorch: Zero to GAN’s”](https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622) taught by [Aakash N S](https://jovian.ml/forum/u/aakashns/summary) of [Jovian.ml](https://www.jovian.ml/). \n",
      "json_metadata": "{\"app\":\"peakd/2020.05.5\",\"format\":\"markdown\",\"description\":\"Zero to GAN's is an online certificate course that takes a hands-on coding-focused approach to deep learning.\",\"tags\":[\"zerotogans\",\"jovianml\",\"ai\",\"deeplearning\",\"machinelearning\",\"ml\",\"pytorch\"],\"links\":[\"https://jovian.ml/oneworldcoder/02-housing-optional\",\"https://jovian.ml/forum/t/start-here-welcome-to-deep-learning-with-pytorch-zero-to-gans/1622\",\"https://jovian.ml/forum/u/aakashns/summary\",\"https://www.jovian.ml/\"],\"image\":[\"https://files.peakd.com/file/peakd-hive/cryptopossible/A2AZGXEm-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/vJnnoXlO-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/zU6fDFSV-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/yQfGxh3y-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/7TkQOAJZ-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/4MoomOlf-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/Pl5aorPs-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/LufsjzWe-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/pQJPJBAg-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/Jl63uEwg-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/nRe9v6cX-image.png\",\"https://files.peakd.com/file/peakd-hive/cryptopossible/45rEo3cU-image.png\"]}",
      "parent_author": "",
      "parent_permlink": "hive-174578",
      "permlink": "deep-learning-predicting-the-average-income-of-residents-in-california",
      "title": "Deep Learning: Predicting the average income of residents in California."
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-09T13:24:36",
  "trx_id": "c1c6f0f2edb8c9037072ccc3a0b0b2dc064f48df",
  "trx_in_block": 2,
  "virtual_op": false
}
cryptopossibleupdated payout for qbaqm8
2020/06/09 11:30:12
authorcryptopossible
permlinkqbaqm8
Transaction InfoBlock #44139747/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44139747,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "qbaqm8"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-09T11:30:12",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/09 10:08:27
authorappics
curatorcryptopossible
payout must be claimedtrue
permlinksneak-peek-new-appics-blockchain-with-cross-posting-to-hive
reward25.298668 VESTS
Transaction InfoBlock #44138117/Virtual Operation 4294967295:76
View Raw JSON Data
{
  "block": 44138117,
  "op": [
    "curation_reward",
    {
      "author": "appics",
      "curator": "cryptopossible",
      "payout_must_be_claimed": true,
      "permlink": "sneak-peek-new-appics-blockchain-with-cross-posting-to-hive",
      "reward": "25.298668 VESTS"
    }
  ],
  "op_in_trx": 76,
  "timestamp": "2020-06-09T10:08:27",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblereceived 75.735 HIVE from power down installment (90.803 HP)
2020/06/07 08:17:42
deposited75.735 HIVE
from accountcryptopossible
to accountcryptopossible
withdrawn147403.402918 VESTS
Transaction InfoBlock #44078450/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44078450,
  "op": [
    "fill_vesting_withdraw",
    {
      "deposited": "75.735 HIVE",
      "from_account": "cryptopossible",
      "to_account": "cryptopossible",
      "withdrawn": "147403.402918 VESTS"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-07T08:17:42",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
cryptopossiblevoted for witness @threespeak
2020/06/07 07:24:18
accountcryptopossible
approvetrue
witnessthreespeak
Transaction InfoBlock #44077385/Trx 6c15437093a0b3e937a95a3cd96523a293aa0b06
View Raw JSON Data
{
  "block": 44077385,
  "op": [
    "account_witness_vote",
    {
      "account": "cryptopossible",
      "approve": true,
      "witness": "threespeak"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-07T07:24:18",
  "trx_id": "6c15437093a0b3e937a95a3cd96523a293aa0b06",
  "trx_in_block": 20,
  "virtual_op": false
}
cryptopossibleunvoted witness @arcange
2020/06/07 07:24:03
accountcryptopossible
approvefalse
witnessarcange
Transaction InfoBlock #44077380/Trx 7785bbcfcadc01967a5a736026efe32cc2afbe15
View Raw JSON Data
{
  "block": 44077380,
  "op": [
    "account_witness_vote",
    {
      "account": "cryptopossible",
      "approve": false,
      "witness": "arcange"
    }
  ],
  "op_in_trx": 0,
  "timestamp": "2020-06-07T07:24:03",
  "trx_id": "7785bbcfcadc01967a5a736026efe32cc2afbe15",
  "trx_in_block": 5,
  "virtual_op": false
}
2020/06/05 12:42:54
authorcryptopossible
permlinkre-cryptopossible-qb3fbb
Transaction InfoBlock #44026283/Virtual Operation 4294967295:2
View Raw JSON Data
{
  "block": 44026283,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "re-cryptopossible-qb3fbb"
    }
  ],
  "op_in_trx": 2,
  "timestamp": "2020-06-05T12:42:54",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}
2020/06/05 10:39:27
authorcryptopossible
permlinkpytorch-a-deep-learning-journey
Transaction InfoBlock #44023822/Virtual Operation 4294967295:14
View Raw JSON Data
{
  "block": 44023822,
  "op": [
    "comment_payout_update",
    {
      "author": "cryptopossible",
      "permlink": "pytorch-a-deep-learning-journey"
    }
  ],
  "op_in_trx": 14,
  "timestamp": "2020-06-05T10:39:27",
  "trx_id": "0000000000000000000000000000000000000000",
  "trx_in_block": 4294967295,
  "virtual_op": true
}

Account Metadata

POSTING JSON METADATA
None
JSON METADATA
None
{
  "posting_json_metadata": {},
  "json_metadata": {}
}

Auth Keys

Owner
Single Signature
Public Keys
STM8enx161opg1tVUbagPmVQshKM56NPPftNRzdpNEqsshXGdKLEs1/1
Active
Single Signature
Public Keys
STM71EChbPkAEypxPkSRu9B6chid3TYE5chgD56QoryKdbLs69jeL1/1
Posting
Single Signature
Public Keys
STM6HCAMrW17J8GDsxqJRhv7njnWWF2GGQd1ULNYEKDJX6CMA2wzL1/1
App Permissions
Memo
STM8KSE9bynaDeKMqkmDrPgbhLdABiMV83bo46FYHVTP9XxpP4RsK
{
  "owner": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM8enx161opg1tVUbagPmVQshKM56NPPftNRzdpNEqsshXGdKLEs",
        1
      ]
    ]
  },
  "active": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [
      [
        "STM71EChbPkAEypxPkSRu9B6chid3TYE5chgD56QoryKdbLs69jeL",
        1
      ]
    ]
  },
  "posting": {
    "weight_threshold": 1,
    "account_auths": [
      [
        "steempeak.app",
        1
      ],
      [
        "threespeak",
        1
      ]
    ],
    "key_auths": [
      [
        "STM6HCAMrW17J8GDsxqJRhv7njnWWF2GGQd1ULNYEKDJX6CMA2wzL",
        1
      ]
    ]
  },
  "memo": "STM8KSE9bynaDeKMqkmDrPgbhLdABiMV83bo46FYHVTP9XxpP4RsK"
}

Witness Votes

0 / 30
No active witness votes.
[]