Opinion
FLORIDA, PETITIONER v. ROBERT A. THOMAS
Chief Justice Rehnquist delivered the opinion of the Court.
In New York v. Belton, 453 U. S. 454 (1981) , we established a bright-line rule permitting a law enforcement officer who has made a lawful custodial arrest of the occupant of a car to search the passenger compartment of that car as a contemporaneous incident of the arrest. We granted certiorari to consider whether that rule is limited to situations in which the officer initiates contact with the occupant of a vehicle while that person remains inside the vehicle. 531 U. S. 1069 (2000) . We find, however, that we lack jurisdiction to decide the question.
On the evening at issue, officers were present at a home in Polk County, Florida, investigating the sale of marijuana and making arrests. Respondent Robert Thomas drove up to the residence, parked in the driveway, and walked toward the back of his vehicle. Officer J. D. Maney met Thomas at the rear of Thomas vehicle, and asked him his name and whether he had a drivers license. After a check of Thomas license revealed an outstanding warrant for his arrest, Officer Maney arrested him, handcuffed him, and took him inside the residence. The officer then went back outside, alone, and searched Thomas car.
Respondent was charged with possession of methamphetamine and related narcotics offenses. The trial court granted his motion to suppress the evidence of narcotics and narcotic paraphernalia. The Second District Court of Appeal reversed, 711 So. 2d 1241 (1998), finding the search valid under New York v. Belton, supra . The Supreme Court of Florida in turn reversed, holding that Belton did not apply.
The court held that Belton s bright-line rule is limited to situations where the law enforcement officer initiates contact with the defendant while the defendant remains in the car. 761 So. 2d 1010, 1014 (2000). The court concluded that Belton was inapplicable, and directed that the trial court determine whether the factors in Chimel [v. California , 395 U. S. 752 (1969) ,] justify the search of Thomas vehicle. 761 So. 2d, at 1014. The court explained that [b]ased on the record … we are unable to ascertain whether [the officers] safety was endangered or whether the preservation of the evidence was in jeopardy, as necessary to justify the search under Chimel v. California , 395 U. S. 752 (1969) , and remanded for further proceedings.
Although the parties did not raise the issue in their briefs on the merits, we must first consider whether we have jurisdiction to decide this case. See Duquesne Light Co. v. Barasch, 488 U. S. 299, 306 (1989) . Title 28 U. S. C. §1257(a) authorizes this Court to review [f]inal judgments or decrees rendered by the highest court of a State in which a decision could be had … where any title, right, privilege, or immunity is specially set up or claimed under the Constitution. In a criminal prosecution, finality generally is defined by a judgment of conviction and the imposition of a sentence. Fort Wayne Books, Inc. v. Indiana, 489 U. S. 46, 54 (1989) . But we have not, in practice, interpreted the finality rule so strictly. In certain circumstances, we have treated state-court judgments as final for jurisdictional purposes although there were further proceedings to take place in the state court. Flynt v. Ohio, 451 U. S. 619, 620621 (1981) (per curiam) . In Cox Broadcasting Corp. v. Cohn, 420 U. S. 469 (1975) , we divided cases of this kind into four categories. None fits the judgment of the Florida Supreme Court, however, and we therefore conclude that its judgment is not final.
The first Cox category includes those cases in which there are further proceedingseven entire trialsyet to occur in the state courts but where for one reason or another the federal issue is conclusive or the outcome of further proceedings preordained. Id. , at 479. The prototypical example of this category is Mills v. Alabama , 384 U. S. 214 (1966) . There the Supreme Court of Alabama held that a statute which prohibited the publication of an editorial endorsement on election day did not violate the First Amendment, and remanded the case for trial. Id., at 216217. Mills conceded that his only defense to the state charge was his constitutional claim; he admitted that he did publish the editorial. We held that this was a final judgment and took jurisdiction, saying that a trial would be no more than a few formal gestures leading inexorably towards a conviction, and then another appeal to the Alabama Supreme Court for it formally to repeat its rejection of Mills constitutional contentions whereupon the case could then once more wind its weary way back to us as a judgment unquestionably final and appealable. Such a roundabout process would not only be an inexcusable delay of the benefits Congress intended to grant by providing for appeal to this Court, but it would also result in a completely unnecessary waste of time and energy in judicial systems already troubled by delays due to congested dockets. Id., at 217218.
The decision of the Supreme Court of Florida here differs considerably from that of the state court in Mills . The Florida Supreme Court remanded the case not only for application of Chimel , but for further factfinding, and the State has not conceded that the search is invalid under Chimel .
In Cox s second category are those cases in which the federal issue, finally decided by the highest court in the State, will survive and require decision regardless of the outcome of future state-court proceedings. 420 U. S., at 480. In Cox we used our decision in Radio Station WOW, Inc. v. Johnson, 326 U. S. 120 (1945) , to illustrate the second category. We said:
In Radio Station WOW , the Nebraska Supreme Court directed the transfer of the properties of a federally licensed radio station and ordered an accounting, rejecting the claim that the transfer order would interfere with the federal license… . Nothing that could happen in the course of the accounting, short of settlement of the case, would foreclose or make unnecessary decision on the federal question. Cox , supra , at 480.
In this case, however, were the Florida courts to find that Chimel allows the search, a decision on the Belton issue would no longer be necessary. We have also noted that we treat state-court judgments in this category as final on the assumption that the federal questions that could come here have been adjudicated by the State court, and the state proceedings to take place on remand could not remotely give rise to a federal question … that may later come here. Cox, 420 U. S., at 480. We cannot make that assumption in this case.
Cases where the federal claim has been finally decided, with further proceedings on the merits in the state courts to come, but in which later review of the federal issue cannot be had, whatever the ultimate outcome of the case, fall into Cox s third category. Id., at 481. New York v. Quarles, 467 U. S. 649 (1984) , is such a case. Respondent was charged in state court with criminal possession of a weapon, and certain evidence was suppressed on federal constitutional grounds. We granted the petition for certiorari and reversed, explaining that the suppression ruling was a final judgment although respondent had yet to be tried. Id., at 651. We said that this case fell within Cox s third category because should the State convict respondent at trial, its claim that certain evidence was wrongfully suppressed will be moot. Should respondent be acquitted at trial, the State will be precluded from pressing its federal claim again on appeal. 467 U. S., at 651, and n. 1.
To deny review here would not necessarily cause Florida to go to trial without the suppressed evidence, with further appeal barred in the event of an acquittal or the federal claim mooted in the event of a conviction. The state court has yet to decide whether the evidence should be suppressed; that will be resolved on remand. If the State prevails on remand and the evidence is admitted under Chimel , then the Belton issue will be moot, and the State cannot seek review of it. But if the State loses, and the evidence is suppressed, Florida law allows the State to appeal, as long as it does so prior to trial. Fla. Stat. §924.071(1) (1996) (The state may appeal from a pretrial order … suppressing evidence); Fla. Rule App. Proc. 9.140(c)(1)(B) (2001) (The state may appeal an order … suppressing before trial … evidence obtained by search and seizure). Should the Supreme Court of Florida rule against the State on the Chimel issue, the question of suppression would be finally decided by the Florida courts, and the State could then seek certiorari in this Court. At that time it could obtain review of both the Belton issue and the Chimel issue. See Jefferson v. City of Tarrant , 522 U. S. 75, 83 (1997) .
The fourth Cox category includes those cases where the federal issue has been finally decided in the state courts with further proceedings pending in which the party seeking review here might prevail on the merits on nonfederal grounds, thus rendering unnecessary review of the federal issue by this Court, and where reversal of the state court on the federal issue would be preclusive of any further litigation on the relevant cause of action rather than merely controlling the nature and character of, or determining the admissibility of evidence in, the state proceedings still to come. In these circumstances, if a refusal immediately to review the state-court decision might seriously erode federal policy, the Court has entertained and decided the federal issue, which itself has been finally determined by the state courts for purposes of the state litigation. 420 U. S., at 482483.
Here the State can make no claim of serious erosion of federal policy that is not common to all run-of-the-mine decisions suppressing evidence in criminal trials. The fourth Cox exception does not apply here.
For the foregoing reasons, we dismiss the writ of certiorari for want of jurisdiction.
It is so ordered.
Opinion
FLORIDA, PETITIONER v. ROBERT A. THOMAS
Chief Justice Rehnquist delivered the opinion of the Court.
In New York v. Belton, 453 U. S. 454 (1981) , we established a bright-line rule permitting a law enforcement officer who has made a lawful custodial arrest of the occupant of a car to search the passenger compartment of that car as a contemporaneous incident of the arrest. We granted certiorari to consider whether that rule is limited to situations in which the officer initiates contact with the occupant of a vehicle while that person remains inside the vehicle. 531 U. S. 1069 (2000) . We find, however, that we lack jurisdiction to decide the question.
On the evening at issue, officers were present at a home in Polk County, Florida, investigating the sale of marijuana and making arrests. Respondent Robert Thomas drove up to the residence, parked in the driveway, and walked toward the back of his vehicle. Officer J. D. Maney met Thomas at the rear of Thomas vehicle, and asked him his name and whether he had a drivers license. After a check of Thomas license revealed an outstanding warrant for his arrest, Officer Maney arrested him, handcuffed him, and took him inside the residence. The officer then went back outside, alone, and searched Thomas car.
Respondent was charged with possession of methamphetamine and related narcotics offenses. The trial court granted his motion to suppress the evidence of narcotics and narcotic paraphernalia. The Second District Court of Appeal reversed, 711 So. 2d 1241 (1998), finding the search valid under New York v. Belton, supra . The Supreme Court of Florida in turn reversed, holding that Belton did not apply.
The court held that Belton s bright-line rule is limited to situations where the law enforcement officer initiates contact with the defendant while the defendant remains in the car. 761 So. 2d 1010, 1014 (2000). The court concluded that Belton was inapplicable, and directed that the trial court determine whether the factors in Chimel [v. California , 395 U. S. 752 (1969) ,] justify the search of Thomas vehicle. 761 So. 2d, at 1014. The court explained that [b]ased on the record … we are unable to ascertain whether [the officers] safety was endangered or whether the preservation of the evidence was in jeopardy, as necessary to justify the search under Chimel v. California , 395 U. S. 752 (1969) , and remanded for further proceedings.
Although the parties did not raise the issue in their briefs on the merits, we must first consider whether we have jurisdiction to decide this case. See Duquesne Light Co. v. Barasch, 488 U. S. 299, 306 (1989) . Title 28 U. S. C. §1257(a) authorizes this Court to review [f]inal judgments or decrees rendered by the highest court of a State in which a decision could be had … where any title, right, privilege, or immunity is specially set up or claimed under the Constitution. In a criminal prosecution, finality generally is defined by a judgment of conviction and the imposition of a sentence. Fort Wayne Books, Inc. v. Indiana, 489 U. S. 46, 54 (1989) . But we have not, in practice, interpreted the finality rule so strictly. In certain circumstances, we have treated state-court judgments as final for jurisdictional purposes although there were further proceedings to take place in the state court. Flynt v. Ohio, 451 U. S. 619, 620621 (1981) (per curiam) . In Cox Broadcasting Corp. v. Cohn, 420 U. S. 469 (1975) , we divided cases of this kind into four categories. None fits the judgment of the Florida Supreme Court, however, and we therefore conclude that its judgment is not final.
The first Cox category includes those cases in which there are further proceedingseven entire trialsyet to occur in the state courts but where for one reason or another the federal issue is conclusive or the outcome of further proceedings preordained. Id. , at 479. The prototypical example of this category is Mills v. Alabama , 384 U. S. 214 (1966) . There the Supreme Court of Alabama held that a statute which prohibited the publication of an editorial endorsement on election day did not violate the First Amendment, and remanded the case for trial. Id., at 216217. Mills conceded that his only defense to the state charge was his constitutional claim; he admitted that he did publish the editorial. We held that this was a final judgment and took jurisdiction, saying that a trial would be no more than a few formal gestures leading inexorably towards a conviction, and then another appeal to the Alabama Supreme Court for it formally to repeat its rejection of Mills constitutional contentions whereupon the case could then once more wind its weary way back to us as a judgment unquestionably final and appealable. Such a roundabout process would not only be an inexcusable delay of the benefits Congress intended to grant by providing for appeal to this Court, but it would also result in a completely unnecessary waste of time and energy in judicial systems already troubled by delays due to congested dockets. Id., at 217218.
The decision of the Supreme Court of Florida here differs considerably from that of the state court in Mills . The Florida Supreme Court remanded the case not only for application of Chimel , but for further factfinding, and the State has not conceded that the search is invalid under Chimel .
In Cox s second category are those cases in which the federal issue, finally decided by the highest court in the State, will survive and require decision regardless of the outcome of future state-court proceedings. 420 U. S., at 480. In Cox we used our decision in Radio Station WOW, Inc. v. Johnson, 326 U. S. 120 (1945) , to illustrate the second category. We said:
In Radio Station WOW , the Nebraska Supreme Court directed the transfer of the properties of a federally licensed radio station and ordered an accounting, rejecting the claim that the transfer order would interfere with the federal license… . Nothing that could happen in the course of the accounting, short of settlement of the case, would foreclose or make unnecessary decision on the federal question. Cox , supra , at 480.
In this case, however, were the Florida courts to find that Chimel allows the search, a decision on the Belton issue would no longer be necessary. We have also noted that we treat state-court judgments in this category as final on the assumption that the federal questions that could come here have been adjudicated by the State court, and the state proceedings to take place on remand could not remotely give rise to a federal question … that may later come here. Cox, 420 U. S., at 480. We cannot make that assumption in this case.
Cases where the federal claim has been finally decided, with further proceedings on the merits in the state courts to come, but in which later review of the federal issue cannot be had, whatever the ultimate outcome of the case, fall into Cox s third category. Id., at 481. New York v. Quarles, 467 U. S. 649 (1984) , is such a case. Respondent was charged in state court with criminal possession of a weapon, and certain evidence was suppressed on federal constitutional grounds. We granted the petition for certiorari and reversed, explaining that the suppression ruling was a final judgment although respondent had yet to be tried. Id., at 651. We said that this case fell within Cox s third category because should the State convict respondent at trial, its claim that certain evidence was wrongfully suppressed will be moot. Should respondent be acquitted at trial, the State will be precluded from pressing its federal claim again on appeal. 467 U. S., at 651, and n. 1.
To deny review here would not necessarily cause Florida to go to trial without the suppressed evidence, with further appeal barred in the event of an acquittal or the federal claim mooted in the event of a conviction. The state court has yet to decide whether the evidence should be suppressed; that will be resolved on remand. If the State prevails on remand and the evidence is admitted under Chimel , then the Belton issue will be moot, and the State cannot seek review of it. But if the State loses, and the evidence is suppressed, Florida law allows the State to appeal, as long as it does so prior to trial. Fla. Stat. §924.071(1) (1996) (The state may appeal from a pretrial order … suppressing evidence); Fla. Rule App. Proc. 9.140(c)(1)(B) (2001) (The state may appeal an order … suppressing before trial … evidence obtained by search and seizure). Should the Supreme Court of Florida rule against the State on the Chimel issue, the question of suppression would be finally decided by the Florida courts, and the State could then seek certiorari in this Court. At that time it could obtain review of both the Belton issue and the Chimel issue. See Jefferson v. City of Tarrant , 522 U. S. 75, 83 (1997) .
The fourth Cox category includes those cases where the federal issue has been finally decided in the state courts with further proceedings pending in which the party seeking review here might prevail on the merits on nonfederal grounds, thus rendering unnecessary review of the federal issue by this Court, and where reversal of the state court on the federal issue would be preclusive of any further litigation on the relevant cause of action rather than merely controlling the nature and character of, or determining the admissibility of evidence in, the state proceedings still to come. In these circumstances, if a refusal immediately to review the state-court decision might seriously erode federal policy, the Court has entertained and decided the federal issue, which itself has been finally determined by the state courts for purposes of the state litigation. 420 U. S., at 482483.
Here the State can make no claim of serious erosion of federal policy that is not common to all run-of-the-mine decisions suppressing evidence in criminal trials. The fourth Cox exception does not apply here.
For the foregoing reasons, we dismiss the writ of certiorari for want of jurisdiction.
It is so ordered.
Opinion
FLORIDA, PETITIONER v. ROBERT A. THOMAS
Chief Justice Rehnquist delivered the opinion of the Court.
In New York v. Belton, 453 U. S. 454 (1981) , we established a bright-line rule permitting a law enforcement officer who has made a lawful custodial arrest of the occupant of a car to search the passenger compartment of that car as a contemporaneous incident of the arrest. We granted certiorari to consider whether that rule is limited to situations in which the officer initiates contact with the occupant of a vehicle while that person remains inside the vehicle. 531 U. S. 1069 (2000) . We find, however, that we lack jurisdiction to decide the question.
On the evening at issue, officers were present at a home in Polk County, Florida, investigating the sale of marijuana and making arrests. Respondent Robert Thomas drove up to the residence, parked in the driveway, and walked toward the back of his vehicle. Officer J. D. Maney met Thomas at the rear of Thomas vehicle, and asked him his name and whether he had a drivers license. After a check of Thomas license revealed an outstanding warrant for his arrest, Officer Maney arrested him, handcuffed him, and took him inside the residence. The officer then went back outside, alone, and searched Thomas car.
Respondent was charged with possession of methamphetamine and related narcotics offenses. The trial court granted his motion to suppress the evidence of narcotics and narcotic paraphernalia. The Second District Court of Appeal reversed, 711 So. 2d 1241 (1998), finding the search valid under New York v. Belton, supra . The Supreme Court of Florida in turn reversed, holding that Belton did not apply.
The court held that Belton s bright-line rule is limited to situations where the law enforcement officer initiates contact with the defendant while the defendant remains in the car. 761 So. 2d 1010, 1014 (2000). The court concluded that Belton was inapplicable, and directed that the trial court determine whether the factors in Chimel [v. California , 395 U. S. 752 (1969) ,] justify the search of Thomas vehicle. 761 So. 2d, at 1014. The court explained that [b]ased on the record … we are unable to ascertain whether [the officers] safety was endangered or whether the preservation of the evidence was in jeopardy, as necessary to justify the search under Chimel v. California , 395 U. S. 752 (1969) , and remanded for further proceedings.
Although the parties did not raise the issue in their briefs on the merits, we must first consider whether we have jurisdiction to decide this case. See Duquesne Light Co. v. Barasch, 488 U. S. 299, 306 (1989) . Title 28 U. S. C. §1257(a) authorizes this Court to review [f]inal judgments or decrees rendered by the highest court of a State in which a decision could be had … where any title, right, privilege, or immunity is specially set up or claimed under the Constitution. In a criminal prosecution, finality generally is defined by a judgment of conviction and the imposition of a sentence. Fort Wayne Books, Inc. v. Indiana, 489 U. S. 46, 54 (1989) . But we have not, in practice, interpreted the finality rule so strictly. In certain circumstances, we have treated state-court judgments as final for jurisdictional purposes although there were further proceedings to take place in the state court. Flynt v. Ohio, 451 U. S. 619, 620621 (1981) (per curiam) . In Cox Broadcasting Corp. v. Cohn, 420 U. S. 469 (1975) , we divided cases of this kind into four categories. None fits the judgment of the Florida Supreme Court, however, and we therefore conclude that its judgment is not final.
The first Cox category includes those cases in which there are further proceedingseven entire trialsyet to occur in the state courts but where for one reason or another the federal issue is conclusive or the outcome of further proceedings preordained. Id. , at 479. The prototypical example of this category is Mills v. Alabama , 384 U. S. 214 (1966) . There the Supreme Court of Alabama held that a statute which prohibited the publication of an editorial endorsement on election day did not violate the First Amendment, and remanded the case for trial. Id., at 216217. Mills conceded that his only defense to the state charge was his constitutional claim; he admitted that he did publish the editorial. We held that this was a final judgment and took jurisdiction, saying that a trial would be no more than a few formal gestures leading inexorably towards a conviction, and then another appeal to the Alabama Supreme Court for it formally to repeat its rejection of Mills constitutional contentions whereupon the case could then once more wind its weary way back to us as a judgment unquestionably final and appealable. Such a roundabout process would not only be an inexcusable delay of the benefits Congress intended to grant by providing for appeal to this Court, but it would also result in a completely unnecessary waste of time and energy in judicial systems already troubled by delays due to congested dockets. Id., at 217218.
The decision of the Supreme Court of Florida here differs considerably from that of the state court in Mills . The Florida Supreme Court remanded the case not only for application of Chimel , but for further factfinding, and the State has not conceded that the search is invalid under Chimel .
In Cox s second category are those cases in which the federal issue, finally decided by the highest court in the State, will survive and require decision regardless of the outcome of future state-court proceedings. 420 U. S., at 480. In Cox we used our decision in Radio Station WOW, Inc. v. Johnson, 326 U. S. 120 (1945) , to illustrate the second category. We said:
In Radio Station WOW , the Nebraska Supreme Court directed the transfer of the properties of a federally licensed radio station and ordered an accounting, rejecting the claim that the transfer order would interfere with the federal license… . Nothing that could happen in the course of the accounting, short of settlement of the case, would foreclose or make unnecessary decision on the federal question. Cox , supra , at 480.
In this case, however, were the Florida courts to find that Chimel allows the search, a decision on the Belton issue would no longer be necessary. We have also noted that we treat state-court judgments in this category as final on the assumption that the federal questions that could come here have been adjudicated by the State court, and the state proceedings to take place on remand could not remotely give rise to a federal question … that may later come here. Cox, 420 U. S., at 480. We cannot make that assumption in this case.
Cases where the federal claim has been finally decided, with further proceedings on the merits in the state courts to come, but in which later review of the federal issue cannot be had, whatever the ultimate outcome of the case, fall into Cox s third category. Id., at 481. New York v. Quarles, 467 U. S. 649 (1984) , is such a case. Respondent was charged in state court with criminal possession of a weapon, and certain evidence was suppressed on federal constitutional grounds. We granted the petition for certiorari and reversed, explaining that the suppression ruling was a final judgment although respondent had yet to be tried. Id., at 651. We said that this case fell within Cox s third category because should the State convict respondent at trial, its claim that certain evidence was wrongfully suppressed will be moot. Should respondent be acquitted at trial, the State will be precluded from pressing its federal claim again on appeal. 467 U. S., at 651, and n. 1.
To deny review here would not necessarily cause Florida to go to trial without the suppressed evidence, with further appeal barred in the event of an acquittal or the federal claim mooted in the event of a conviction. The state court has yet to decide whether the evidence should be suppressed; that will be resolved on remand. If the State prevails on remand and the evidence is admitted under Chimel , then the Belton issue will be moot, and the State cannot seek review of it. But if the State loses, and the evidence is suppressed, Florida law allows the State to appeal, as long as it does so prior to trial. Fla. Stat. §924.071(1) (1996) (The state may appeal from a pretrial order … suppressing evidence); Fla. Rule App. Proc. 9.140(c)(1)(B) (2001) (The state may appeal an order … suppressing before trial … evidence obtained by search and seizure). Should the Supreme Court of Florida rule against the State on the Chimel issue, the question of suppression would be finally decided by the Florida courts, and the State could then seek certiorari in this Court. At that time it could obtain review of both the Belton issue and the Chimel issue. See Jefferson v. City of Tarrant , 522 U. S. 75, 83 (1997) .
The fourth Cox category includes those cases where the federal issue has been finally decided in the state courts with further proceedings pending in which the party seeking review here might prevail on the merits on nonfederal grounds, thus rendering unnecessary review of the federal issue by this Court, and where reversal of the state court on the federal issue would be preclusive of any further litigation on the relevant cause of action rather than merely controlling the nature and character of, or determining the admissibility of evidence in, the state proceedings still to come. In these circumstances, if a refusal immediately to review the state-court decision might seriously erode federal policy, the Court has entertained and decided the federal issue, which itself has been finally determined by the state courts for purposes of the state litigation. 420 U. S., at 482483.
Here the State can make no claim of serious erosion of federal policy that is not common to all run-of-the-mine decisions suppressing evidence in criminal trials. The fourth Cox exception does not apply here.
For the foregoing reasons, we dismiss the writ of certiorari for want of jurisdiction.
It is so ordered.
Opinion
FLORIDA, PETITIONER v. ROBERT A. THOMAS
Chief Justice Rehnquist delivered the opinion of the Court.
In New York v. Belton, 453 U. S. 454 (1981) , we established a bright-line rule permitting a law enforcement officer who has made a lawful custodial arrest of the occupant of a car to search the passenger compartment of that car as a contemporaneous incident of the arrest. We granted certiorari to consider whether that rule is limited to situations in which the officer initiates contact with the occupant of a vehicle while that person remains inside the vehicle. 531 U. S. 1069 (2000) . We find, however, that we lack jurisdiction to decide the question.
On the evening at issue, officers were present at a home in Polk County, Florida, investigating the sale of marijuana and making arrests. Respondent Robert Thomas drove up to the residence, parked in the driveway, and walked toward the back of his vehicle. Officer J. D. Maney met Thomas at the rear of Thomas vehicle, and asked him his name and whether he had a drivers license. After a check of Thomas license revealed an outstanding warrant for his arrest, Officer Maney arrested him, handcuffed him, and took him inside the residence. The officer then went back outside, alone, and searched Thomas car.
Respondent was charged with possession of methamphetamine and related narcotics offenses. The trial court granted his motion to suppress the evidence of narcotics and narcotic paraphernalia. The Second District Court of Appeal reversed, 711 So. 2d 1241 (1998), finding the search valid under New York v. Belton, supra . The Supreme Court of Florida in turn reversed, holding that Belton did not apply.
The court held that Belton s bright-line rule is limited to situations where the law enforcement officer initiates contact with the defendant while the defendant remains in the car. 761 So. 2d 1010, 1014 (2000). The court concluded that Belton was inapplicable, and directed that the trial court determine whether the factors in Chimel [v. California , 395 U. S. 752 (1969) ,] justify the search of Thomas vehicle. 761 So. 2d, at 1014. The court explained that [b]ased on the record … we are unable to ascertain whether [the officers] safety was endangered or whether the preservation of the evidence was in jeopardy, as necessary to justify the search under Chimel v. California , 395 U. S. 752 (1969) , and remanded for further proceedings.
Although the parties did not raise the issue in their briefs on the merits, we must first consider whether we have jurisdiction to decide this case. See Duquesne Light Co. v. Barasch, 488 U. S. 299, 306 (1989) . Title 28 U. S. C. §1257(a) authorizes this Court to review [f]inal judgments or decrees rendered by the highest court of a State in which a decision could be had … where any title, right, privilege, or immunity is specially set up or claimed under the Constitution. In a criminal prosecution, finality generally is defined by a judgment of conviction and the imposition of a sentence. Fort Wayne Books, Inc. v. Indiana, 489 U. S. 46, 54 (1989) . But we have not, in practice, interpreted the finality rule so strictly. In certain circumstances, we have treated state-court judgments as final for jurisdictional purposes although there were further proceedings to take place in the state court. Flynt v. Ohio, 451 U. S. 619, 620621 (1981) (per curiam) . In Cox Broadcasting Corp. v. Cohn, 420 U. S. 469 (1975) , we divided cases of this kind into four categories. None fits the judgment of the Florida Supreme Court, however, and we therefore conclude that its judgment is not final.
The first Cox category includes those cases in which there are further proceedingseven entire trialsyet to occur in the state courts but where for one reason or another the federal issue is conclusive or the outcome of further proceedings preordained. Id. , at 479. The prototypical example of this category is Mills v. Alabama , 384 U. S. 214 (1966) . There the Supreme Court of Alabama held that a statute which prohibited the publication of an editorial endorsement on election day did not violate the First Amendment, and remanded the case for trial. Id., at 216217. Mills conceded that his only defense to the state charge was his constitutional claim; he admitted that he did publish the editorial. We held that this was a final judgment and took jurisdiction, saying that a trial would be no more than a few formal gestures leading inexorably towards a conviction, and then another appeal to the Alabama Supreme Court for it formally to repeat its rejection of Mills constitutional contentions whereupon the case could then once more wind its weary way back to us as a judgment unquestionably final and appealable. Such a roundabout process would not only be an inexcusable delay of the benefits Congress intended to grant by providing for appeal to this Court, but it would also result in a completely unnecessary waste of time and energy in judicial systems already troubled by delays due to congested dockets. Id., at 217218.
The decision of the Supreme Court of Florida here differs considerably from that of the state court in Mills . The Florida Supreme Court remanded the case not only for application of Chimel , but for further factfinding, and the State has not conceded that the search is invalid under Chimel .
In Cox s second category are those cases in which the federal issue, finally decided by the highest court in the State, will survive and require decision regardless of the outcome of future state-court proceedings. 420 U. S., at 480. In Cox we used our decision in Radio Station WOW, Inc. v. Johnson, 326 U. S. 120 (1945) , to illustrate the second category. We said:
In Radio Station WOW , the Nebraska Supreme Court directed the transfer of the properties of a federally licensed radio station and ordered an accounting, rejecting the claim that the transfer order would interfere with the federal license… . Nothing that could happen in the course of the accounting, short of settlement of the case, would foreclose or make unnecessary decision on the federal question. Cox , supra , at 480.
In this case, however, were the Florida courts to find that Chimel allows the search, a decision on the Belton issue would no longer be necessary. We have also noted that we treat state-court judgments in this category as final on the assumption that the federal questions that could come here have been adjudicated by the State court, and the state proceedings to take place on remand could not remotely give rise to a federal question … that may later come here. Cox, 420 U. S., at 480. We cannot make that assumption in this case.
Cases where the federal claim has been finally decided, with further proceedings on the merits in the state courts to come, but in which later review of the federal issue cannot be had, whatever the ultimate outcome of the case, fall into Cox s third category. Id., at 481. New York v. Quarles, 467 U. S. 649 (1984) , is such a case. Respondent was charged in state court with criminal possession of a weapon, and certain evidence was suppressed on federal constitutional grounds. We granted the petition for certiorari and reversed, explaining that the suppression ruling was a final judgment although respondent had yet to be tried. Id., at 651. We said that this case fell within Cox s third category because should the State convict respondent at trial, its claim that certain evidence was wrongfully suppressed will be moot. Should respondent be acquitted at trial, the State will be precluded from pressing its federal claim again on appeal. 467 U. S., at 651, and n. 1.
To deny review here would not necessarily cause Florida to go to trial without the suppressed evidence, with further appeal barred in the event of an acquittal or the federal claim mooted in the event of a conviction. The state court has yet to decide whether the evidence should be suppressed; that will be resolved on remand. If the State prevails on remand and the evidence is admitted under Chimel , then the Belton issue will be moot, and the State cannot seek review of it. But if the State loses, and the evidence is suppressed, Florida law allows the State to appeal, as long as it does so prior to trial. Fla. Stat. §924.071(1) (1996) (The state may appeal from a pretrial order … suppressing evidence); Fla. Rule App. Proc. 9.140(c)(1)(B) (2001) (The state may appeal an order … suppressing before trial … evidence obtained by search and seizure). Should the Supreme Court of Florida rule against the State on the Chimel issue, the question of suppression would be finally decided by the Florida courts, and the State could then seek certiorari in this Court. At that time it could obtain review of both the Belton issue and the Chimel issue. See Jefferson v. City of Tarrant , 522 U. S. 75, 83 (1997) .
The fourth Cox category includes those cases where the federal issue has been finally decided in the state courts with further proceedings pending in which the party seeking review here might prevail on the merits on nonfederal grounds, thus rendering unnecessary review of the federal issue by this Court, and where reversal of the state court on the federal issue would be preclusive of any further litigation on the relevant cause of action rather than merely controlling the nature and character of, or determining the admissibility of evidence in, the state proceedings still to come. In these circumstances, if a refusal immediately to review the state-court decision might seriously erode federal policy, the Court has entertained and decided the federal issue, which itself has been finally determined by the state courts for purposes of the state litigation. 420 U. S., at 482483.
Here the State can make no claim of serious erosion of federal policy that is not common to all run-of-the-mine decisions suppressing evidence in criminal trials. The fourth Cox exception does not apply here.
For the foregoing reasons, we dismiss the writ of certiorari for want of jurisdiction.
It is so ordered.
Opinion
FLORIDA, PETITIONER v. ROBERT A. THOMAS
Chief Justice Rehnquist delivered the opinion of the Court.
In New York v. Belton, 453 U. S. 454 (1981) , we established a bright-line rule permitting a law enforcement officer who has made a lawful custodial arrest of the occupant of a car to search the passenger compartment of that car as a contemporaneous incident of the arrest. We granted certiorari to consider whether that rule is limited to situations in which the officer initiates contact with the occupant of a vehicle while that person remains inside the vehicle. 531 U. S. 1069 (2000) . We find, however, that we lack jurisdiction to decide the question.
On the evening at issue, officers were present at a home in Polk County, Florida, investigating the sale of marijuana and making arrests. Respondent Robert Thomas drove up to the residence, parked in the driveway, and walked toward the back of his vehicle. Officer J. D. Maney met Thomas at the rear of Thomas vehicle, and asked him his name and whether he had a drivers license. After a check of Thomas license revealed an outstanding warrant for his arrest, Officer Maney arrested him, handcuffed him, and took him inside the residence. The officer then went back outside, alone, and searched Thomas car.
Respondent was charged with possession of methamphetamine and related narcotics offenses. The trial court granted his motion to suppress the evidence of narcotics and narcotic paraphernalia. The Second District Court of Appeal reversed, 711 So. 2d 1241 (1998), finding the search valid under New York v. Belton, supra . The Supreme Court of Florida in turn reversed, holding that Belton did not apply.
The court held that Belton s bright-line rule is limited to situations where the law enforcement officer initiates contact with the defendant while the defendant remains in the car. 761 So. 2d 1010, 1014 (2000). The court concluded that Belton was inapplicable, and directed that the trial court determine whether the factors in Chimel [v. California , 395 U. S. 752 (1969) ,] justify the search of Thomas vehicle. 761 So. 2d, at 1014. The court explained that [b]ased on the record … we are unable to ascertain whether [the officers] safety was endangered or whether the preservation of the evidence was in jeopardy, as necessary to justify the search under Chimel v. California , 395 U. S. 752 (1969) , and remanded for further proceedings.
Although the parties did not raise the issue in their briefs on the merits, we must first consider whether we have jurisdiction to decide this case. See Duquesne Light Co. v. Barasch, 488 U. S. 299, 306 (1989) . Title 28 U. S. C. §1257(a) authorizes this Court to review [f]inal judgments or decrees rendered by the highest court of a State in which a decision could be had … where any title, right, privilege, or immunity is specially set up or claimed under the Constitution. In a criminal prosecution, finality generally is defined by a judgment of conviction and the imposition of a sentence. Fort Wayne Books, Inc. v. Indiana, 489 U. S. 46, 54 (1989) . But we have not, in practice, interpreted the finality rule so strictly. In certain circumstances, we have treated state-court judgments as final for jurisdictional purposes although there were further proceedings to take place in the state court. Flynt v. Ohio, 451 U. S. 619, 620621 (1981) (per curiam) . In Cox Broadcasting Corp. v. Cohn, 420 U. S. 469 (1975) , we divided cases of this kind into four categories. None fits the judgment of the Florida Supreme Court, however, and we therefore conclude that its judgment is not final.
The first Cox category includes those cases in which there are further proceedingseven entire trialsyet to occur in the state courts but where for one reason or another the federal issue is conclusive or the outcome of further proceedings preordained. Id. , at 479. The prototypical example of this category is Mills v. Alabama , 384 U. S. 214 (1966) . There the Supreme Court of Alabama held that a statute which prohibited the publication of an editorial endorsement on election day did not violate the First Amendment, and remanded the case for trial. Id., at 216217. Mills conceded that his only defense to the state charge was his constitutional claim; he admitted that he did publish the editorial. We held that this was a final judgment and took jurisdiction, saying that a trial would be no more than a few formal gestures leading inexorably towards a conviction, and then another appeal to the Alabama Supreme Court for it formally to repeat its rejection of Mills constitutional contentions whereupon the case could then once more wind its weary way back to us as a judgment unquestionably final and appealable. Such a roundabout process would not only be an inexcusable delay of the benefits Congress intended to grant by providing for appeal to this Court, but it would also result in a completely unnecessary waste of time and energy in judicial systems already troubled by delays due to congested dockets. Id., at 217218.
The decision of the Supreme Court of Florida here differs considerably from that of the state court in Mills . The Florida Supreme Court remanded the case not only for application of Chimel , but for further factfinding, and the State has not conceded that the search is invalid under Chimel .
In Cox s second category are those cases in which the federal issue, finally decided by the highest court in the State, will survive and require decision regardless of the outcome of future state-court proceedings. 420 U. S., at 480. In Cox we used our decision in Radio Station WOW, Inc. v. Johnson, 326 U. S. 120 (1945) , to illustrate the second category. We said:
In Radio Station WOW , the Nebraska Supreme Court directed the transfer of the properties of a federally licensed radio station and ordered an accounting, rejecting the claim that the transfer order would interfere with the federal license… . Nothing that could happen in the course of the accounting, short of settlement of the case, would foreclose or make unnecessary decision on the federal question. Cox , supra , at 480.
In this case, however, were the Florida courts to find that Chimel allows the search, a decision on the Belton issue would no longer be necessary. We have also noted that we treat state-court judgments in this category as final on the assumption that the federal questions that could come here have been adjudicated by the State court, and the state proceedings to take place on remand could not remotely give rise to a federal question … that may later come here. Cox, 420 U. S., at 480. We cannot make that assumption in this case.
Cases where the federal claim has been finally decided, with further proceedings on the merits in the state courts to come, but in which later review of the federal issue cannot be had, whatever the ultimate outcome of the case, fall into Cox s third category. Id., at 481. New York v. Quarles, 467 U. S. 649 (1984) , is such a case. Respondent was charged in state court with criminal possession of a weapon, and certain evidence was suppressed on federal constitutional grounds. We granted the petition for certiorari and reversed, explaining that the suppression ruling was a final judgment although respondent had yet to be tried. Id., at 651. We said that this case fell within Cox s third category because should the State convict respondent at trial, its claim that certain evidence was wrongfully suppressed will be moot. Should respondent be acquitted at trial, the State will be precluded from pressing its federal claim again on appeal. 467 U. S., at 651, and n. 1.
To deny review here would not necessarily cause Florida to go to trial without the suppressed evidence, with further appeal barred in the event of an acquittal or the federal claim mooted in the event of a conviction. The state court has yet to decide whether the evidence should be suppressed; that will be resolved on remand. If the State prevails on remand and the evidence is admitted under Chimel , then the Belton issue will be moot, and the State cannot seek review of it. But if the State loses, and the evidence is suppressed, Florida law allows the State to appeal, as long as it does so prior to trial. Fla. Stat. §924.071(1) (1996) (The state may appeal from a pretrial order … suppressing evidence); Fla. Rule App. Proc. 9.140(c)(1)(B) (2001) (The state may appeal an order … suppressing before trial … evidence obtained by search and seizure). Should the Supreme Court of Florida rule against the State on the Chimel issue, the question of suppression would be finally decided by the Florida courts, and the State could then seek certiorari in this Court. At that time it could obtain review of both the Belton issue and the Chimel issue. See Jefferson v. City of Tarrant , 522 U. S. 75, 83 (1997) .
The fourth Cox category includes those cases where the federal issue has been finally decided in the state courts with further proceedings pending in which the party seeking review here might prevail on the merits on nonfederal grounds, thus rendering unnecessary review of the federal issue by this Court, and where reversal of the state court on the federal issue would be preclusive of any further litigation on the relevant cause of action rather than merely controlling the nature and character of, or determining the admissibility of evidence in, the state proceedings still to come. In these circumstances, if a refusal immediately to review the state-court decision might seriously erode federal policy, the Court has entertained and decided the federal issue, which itself has been finally determined by the state courts for purposes of the state litigation. 420 U. S., at 482483.
Here the State can make no claim of serious erosion of federal policy that is not common to all run-of-the-mine decisions suppressing evidence in criminal trials. The fourth Cox exception does not apply here.
For the foregoing reasons, we dismiss the writ of certiorari for want of jurisdiction.
It is so ordered.


404
Oops! The requested page can not be found.
Contact your administrator if you believe something should exist here.
Meanwhile, you may return to dashboard.
Contact your administrator if you believe something should exist here.
Meanwhile, you may return to dashboard.


"{{ movie.original_title }}" (original title)
Rating: {{ movie.vote_average }}
Released: ({{ movie.release_date | releaseYear }})


Experiments
Any open source project has an experimental side as part of its DNA. Infinispan goes a step further and experiments with academic and research projects.
Infinispan Ensemble
Infinispan Ensemble exposes Infinispan APIs and federates a collection of data grid clusters. The set of data grids is seen by the client as a single data grid for which Infinispan Ensemble provides the following user-defined guarantees:
- geographical guarantees: a certain set of data is guaranteed to be duplicated across two geographically separated clusters.
- dependability: a given set of data is guaranteed to be in at least n clusters.
A user can access the data through the set of Infinispan APIs including the key/value APIs and the M/R API. This project opens the door for low latency, local or near-local operations while still guaranteeing business defined dependability or legal guarantees (territoriality constraints for example).
This project is a contribution of the University of Neuchatel through its participation to the LEADS project.
You can find more information on the contribution’s GitHub repository.
Infinispan Atomic Factory
Distributed systems aggregate large numbers of heterogeneous components that are subject to failures and asynchrony. To tame such a capricious nature, systems designers resort to non-blocking techniques such as state machine replication. This approach provides consistent non-blocking operations to a shared object replicated at a quorum of machines. Atomic Object Factory is an implementation of the state machine replication paradigm over Infinispan. Using the factory is as simple as employing the synchronized keyword in Java: it suffices to call it with a Serializable class, and it wraps for you the dependability, consistency and liveness guarantees of the instantiated object over multiple Infinispan servers. The factory is universal in the sense that it can instantiate an object of any (serializable) class atop an Infinispan cache, making transparently the object replicated and durable, while ensuring strong consistency despite concurrent access.
This project opens the door to new use cases to Infinispan that is traditionally served by projects like Apache ZooKeeper.
This project is a contribution of the University of Neuchatel through its participation to the LEADS project.
You can find more information on the contribution’s GitHub repository.
Using Apache Gora APIs with Infinispan
Apache Gora is an abstraction API to persist and execute map reduce operations on big data.
Through its LEADS project contribution, the University of Neuchatel has contributed an Apache Gora backend that persists data in Infinispan.
This is particularly useful when you want to use projects using Apache Gora to persist their data and execute map / reduce jobs. The main example is Apache Nutch, a very popular and efficient Web crawler. You can now store Nutch data into an Infinispan backed data grid and have the M/R jobs executed on each node.
Where to go next?
A nice way to see Infinispan Gora in action is to follow Unicrawl's tutorial. This tutorial runs a small cluster of Infinispan in which Apache Nutch's data is stored through Apache Gora and using the Avro serialization for Infinispan. Check the tutorial.
You can find the code and more information on the contribution's GitHub repository.
Serializing data via Apache Avro
Apache Avro is an efficient and compact serialization format.
Through its LEADS project contribution, the University of Neuchatel has contributed an Avro backend to store, retrieve and query Avro defined types via the HotRod protocol.
This is particularly useful if you want to store data in this portable format and if you want to share data with Avro consuming applications.
Where to go next?
A nice way to see the Apache Avro serialization in action is to follow Unicrawl's tutorial. This tutorial runs a small cluster of Infinispan in which Apache Nutch's data is stored through Apache Gora and using the Avro serialization for Infinispan. Check the tutorial.
You can find the code and more information on the contribution's GitHub repository.


| Web Page | Explanation | Video | Observable | Deprecated at Version |
|---|---|---|---|---|
| Deeplearnjs Version 0.3.2 | ||||
| jj06-squeezenet.html | .. | video | ... | 0.3.13 |
| jj07-mnist.html | .. | video | ... | 0.6.0 |
| Tensorflowjs Version 0.10.3 | ||||
| tfjs01-functions.html | Updated to also show functions with multiple variable returns using arrays and objects and module solutions using namespacing | Video | .... | Active Version |
| tfjs02-basics.html | Beware lots of Tensors in one function | Video | .... | Active Version |
| tfjs03-general.html | General Tensors and how to use them | Video | .... | Active Version |
| tfjs04-quadratic.html | First Neural Network solving the quadratic equation | Video | .... | Active Version |
| tfjs05-matrix-math.html | Tensors and Matrix Math | Video | .... | Active Version |
| tfjs06-javascript.html | A reminder of many things Javascript can do. This is still in draft mode. I have a lot still to do here | .. | .... | Active Version |
| tfjs07-xor-neural-network.html | Solving an XOR Neural Network | ... | .... | Active Version |
| tfjs08-knn.html | K-Nearest Neighbor Machine Learning Classification | Video | .... | Active Version |
| tfjs10-xor-layers.html | Bit slow but very easy to read the layers. Original by Matt Cameron. His Code is here. | ... | .... | Active Version |
| tfjs11-load-weights.html | Finally got weight saving and loading working | ... | .... | Active Version |
| tfjs14-sinusoidal.html | I just really like sinusoidals | ... | .... | ..... |
| tfjs15-keras.html | As simple as I can make Keras models | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| Some General Stuff I am working on | ||||
| Rocksetta version of TFJS Getting Started | My version of the Tensorflowjs Getting Started. Can edit and run even from a cell phone | ... | .... | Active Version |
| Rocksetta version of TFJS Mobinet | Edit online even from a Mobile device | ... | .... | Active Version |
| android-issue.html | The easiest version of the issue many Android phones are having using Tensorflowjs. Looks like it is part of the loss caculation with Layers. | ... | ... | Active Version |
| kickstarter.html | Just having fun with Vega-Lite graphs and my New Kickstarter. | ... | .... | ..... |
| Web Cam to BVH | Web cam working not yet converting to BVH animation format | ... | .... | ..... |
| TensorHtmlPrint.html | Prints any dimension Tensor onto a web page. Not very well written but does seem to work | ... | .... | Active Version |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| . | .. | ... | .... | ..... |
| Link | Code | Notes: use (ctrl-shift-I) to open browser console |
|---|---|---|
| Rocksetta: Addition RNN | Right Click-->View Page Source | Works! May not work on Android 8.0.0 |
| Tensorflow: Getting Started | Right Click-->View Page Source | No Changes to this Tensorflow Beginner Page |
| Rocksetta Layers: Iris Demo | Right Click-->View Page Source | Works! |
| Rocksetta: Train MNIST with the Core API | Right Click-->View Page Source | Works! |
| Rocksetta Layers: MNIST CNN Transfer Learning Demo | Right Click-->View Page Source | Works! |
| Rocksetta: Train MNIST with the Layers API | Right Click-->View Page Source | Works! |
| Rocksetta: Using a pretrained MobileNet | Right Click-->View Page Source | Works! |
| Rocksetta: Fitting a curve to synthetic data | Right Click-->View Page Source | Works! |
| Rocksetta: Polynomial Regression Training Example | Right Click-->View Page Source | Works! |
| Rocksetta: Layers: Sentiment Analysis Demo | Right Click-->View Page Source | Works! |
| Rocksetta:Layers: Sequence-to-Sequence (English-French Translation) | Right Click-->View Page Source | Works! |
| Rocksetta: Pacman Game webcam-transfer-learning | Right Click-->View Page Source | Works! |
| Rocksetta: tiny-yolo-demo | Right Click-->View Page Source | Works! just not on my Android 8.0 Mobile, but does on iPhone |
| Rocksetta:Sentiment Analysis converting Keras | Right Click-->View Page Source | Works!.... |
| Rocksetta:posenet/camera | Right Click-->View Page Source | WebCam posing program for single or multiple users using posenet |
| Rocksetta: posenet/coco images | Right Click-->View Page Source | Loads images for multiple or single pose positions using posenet |
| Rocksetta: | Right Click-->View Page Source | .... |
| Rocksetta: | Right Click-->View Page Source | .... |
| Rocksetta: | Right Click-->View Page Source | .... |
| Rocksetta: | Right Click-->View Page Source | .... |
| Rocksetta: | Right Click-->View Page Source | .... |
| Video | Topic | My Notes |
|---|---|---|
| Machine Learning in JavaScript (TensorFlow Dev Summit 2018) | This is where Nikhil Thorat and Daniel Smilkov introduce the upgrade to Tensorflowjs from Deeplearnjs | Deprecated all my Deeplearnjs videos but is such an improvement, with full Google support |
| TensorFlow.js Quick Start | Looks like this is part of a full course on Tensorflowjs using angular.js with build tools | Very slick video, looks like angular.js works well with Tensorflowjs |
| Migrating a simple Deeplearn.js project to TensorFlow.js | Converting from Deeplearnjs to Tensorflowjs with build tools | I am not using build tools, Nikos does |
| Using TensorFlow.js ̶D̶e̶e̶p̶l̶e̶a̶r̶n̶.̶j̶s̶ to find the coefficients of a quadratic equation! | More build tools examples by Quantum Information | Well done Nikkos. His twitter is @quantumjs |
| Tensorflow.js Explained | Another person who is impressed with Tensorflowjs | By Siraj Raval who makes a lot of high speed, high quality Machine Learning Videos |
| TensorFlow 101 (Really Awesome Intro Into TensorFlow) | By Coding Tech | Says you must know Machine Learning to make it useful |
| . | .. | |
| . | .. | |
| . | .. | |
| . | .. |


FAQ: Using Sage#
How do I get started?#
You can try out Sage without downloading anything:
CoCalc™: Go to https://cocalc.com and set up a free account.
If you log in, you will gain access to the latest version of Sage and to many other programs.
Note that this website is an independent commercial service.
Sage cell: A “one-off” version of Sage, available for doing one computation at a time. https://sagecell.sagemath.org/
To download a pre-built binary Sage distribution, visit http://sagemath.org/download.html and click on the link for the binary for your operating system.
The source code of Sage is also available for you to download and use. Go to http://www.sagemath.org/download-source.html to download the tar archive for any release of Sage.
The Sage Jupyter notebook runs within a web browser. To start the notebook,
issue the following command in a terminal, if sage
is in your PATH
$ sage -notebook
What are the prerequisites for installing a copy of Sage on my computer?#
Most of the dependencies of Sage are shipped with Sage itself. In most cases, you can download a pre-built binary and use that without installing any dependencies. If you use Windows, you will need to install VirtualBox, which can be downloaded from the page https://www.virtualbox.org/wiki/Downloads. After installing VirtualBox, you need to download a VirtualBox distribution of Sage available at http://www.sagemath.org/download-windows.html. Ensure you follow the instructions at that page, then start the Sage virtual machine using the VirtualBox software.
You can get the complete source for Sage to compile it on your own
Linux or Mac OS X system. Sage lives in an isolated directory and does
not interfere with your surrounding system. It ships together with
everything necessary to develop Sage, the source code, all its
dependencies and the complete changelog. On Linux systems like
Debian/Ubuntu, you may have to install the build essential
package and the m4
macro processor. Your system
needs to have a working C compiler if you want to compile Sage
from source. On
Debian/Ubuntu, you can install these prerequisites as follows:
$ sudo apt-get install build-essential m4
If you have a multi-core system, you can opt for a parallel build of Sage. The command
$ export MAKE='make -j8'
will enable 8 threads for parts of the build that support parallelism. Change the number 8 as appropriate to suit the number of cores on your system. Some Sage installations may have OpenMP-enabled BLAS (and other) libraries. The amount of OpenMP parallelism is controlled by the environment variable OMP_NUM_THREADS; however, it is known to not play well with Python parallelism, and you might want to
$ export OMP_NUM_THREADS=1
in case of crashes or hangs.
More details may be found in Installation Manual.
How to get Sage’s Python to recognize my system’s Tcl/Tk install?#
It may be that you have Tcl/Tk installed and that your system’s Python recognizes it but Sage’s Python does not. To fix that, install the tcl/tk development library. On Ubuntu, this is the command
$ sudo apt-get install tk8.5-dev
or something along that line. Next, reinstall Sage’s Python:
$ sage -f python3
This will pick up the tcl/tk library automatically. After successfully reinstalling Sage’s Python, from within the Sage command line interface, issue these commands:
import _tkinter
import Tkinter
If they do not raise an ImportError
then it worked.
How do I import Sage into a Python script?#
You can import Sage as a library in a Python script. One caveat is that you need to run that Python script using the version of Python that is bundled with Sage (Sage 9.2 ships with Python 3.7.x). To import Sage, put the following in your Python script:
from sage.all import *
When you want to run your script, you need to invoke Sage with the
option -python
which would run your script using the version of
Python that comes with Sage. For example, if Sage is in your PATH
variable then you can do this:
$ sage -python /path/to/my/script.py
Another way is to write a Sage script and run that script using Sage
itself. A Sage script has the file extension .sage
and is more or
less a Python script but uses Sage-specific functions and
commands. You can then run that Sage script like so:
$ sage /path/to/my/script.sage
This will take care of loading the necessary environment variables and default imports for you.
How can I reload a Python script in a Sage session?#
You can load a Python script in a Sage session with the command load. For example, we could use Sage to import a file called simple.py with:
load("simple.py")
and repeat this command every time that we change the file simple.py. However, if we type:
attach("simple.py")
every change applied to the file simple.py will be automatically updated in Sage.
Can I use SageMath with Python 3.x?#
Since release 9.0 from January 2020, SageMath is running on top of Python 3.
I used XXX to install Sage X.Y and that version is giving lots of errors. What can I do?#
The version of Sage, i.e. Sage version X.Y, that is available on your XXX system through its package manager, is very old. No one has yet found time to update the XXX version of Sage. Any help is greatly appreciated. You should download the latest version of Sage from the download page. If you would like to help with updating the XXX version of Sage, please email the sage-devel mailing list.
Should I use the official version or development version?#
You are encouraged to use the latest official version of Sage. Development versions are frequently announced on the sage-devel and sage-release mailing lists. An easy way of helping out with Sage development is to download the latest development release, compile it on your system, run all doctests, and report any compilation errors or doctest failures.
Is Sage difficult to learn?#
Basic features of Sage should be as easy to learn as learning the basics of Python. Numerous tutorials are available online to help you learn Sage. To get the most out of Sage, you are encouraged to learn some features of the Python programming language. Here is an incomplete list of resources on Python. Further resources can be found by a web search.
Building Skills in Python by Steven F. Lott
Dive into Python by Mark Pilgrim
How to Think Like a Computer Scientist by Jeffrey Elkner, Allen B. Downey, and Chris Meyers
Python home page and the Python standard documentation
Can I do X in Sage?#
You are encouraged to use Sage’s tab autocompletion. Just type a few
characters, hit the Tab key, and see if the command you want appears
in the list of tab autocompletion. If you have a command called
mycmd
, then type mycmd.
and hit the Tab key to get a list of
functionalities that are supported by that command. To read the
documentation of mycmd
, type mycmd?
and press the Enter key to
read the documentation for that command. Similarly, type mycmd??
and hit the Enter key to get the source code of that command. You are
also encouraged to search through the source code and documentation of
the Sage library. To search through the source code of the Sage
library, use the command search_src("<search-keyword>")
where you
should replace <search-keyword>
with the key words you are looking
for. Also, you can search through the documentation of the Sage
library using the command search_doc("<search-keyword>")
.
What exactly does Sage do when I type “0.6**2”?#
When you type “0.6**2” in Python, it returns something like 0.35999999999999999. But when you do the same in Sage it returns 0.360000000000000. To understand why Python behaves as it does, see the Python Tutorial, especially the chapter “Floating Point Arithmetic: Issues and Limitations”. What Sage does is “preparse” the input and transforms it like this:
sage: preparse("0.6**2")
"RealNumber('0.6')**Integer(2)"
So what is actually run is:
RealNumber('0.6')**Integer(2)
The Sage developers (in fact, Carl Witty) decided that Sage floating
point numbers should by default print only the known correct decimal
digits, when possible, thus skirting the problem that Python has. This
decision has its pros and cons. Note that RealNumber
and
Integer
are Sage specific, so you would not be able to just type
the above into Python and expect it to work without first an import
statement such as:
from sage.all import RealNumber, Integer, preparse
Why is Sage’s command history different from Magma’s?#
Using Sage, you are missing a feature of the Magma command line interface. In Magma, if you enter a line found in history using up arrow key and then press down arrow key, then the next line in history is fetched. This feature allows you to fetch as many successive lines in history as you like. However, Sage does not have a similar feature. The IPython command prompt uses the readline library (via pyreadline), which evidently does not support this feature. Magma has its own custom “readline-like” library, which does support this feature. (Since so many people have requested this feature, if anybody can figure out how to implement it, then such an implementation would certainly be welcome!)
I have type issues using SciPy, cvxopt or NumPy from Sage.#
You are using SciPy or cvxopt or NumPy from Sage and you get type errors, e.g.
TypeError: function not supported for these types, and can't coerce safely to supported types.
When you type in numbers into Sage, the pre-processor converts them to a base ring, which you can see by doing:
sage: preparse("stats.uniform(0,15).ppf([0.5,0.7])")
"stats.uniform(Integer(0),Integer(15)).ppf([RealNumber('0.5'),RealNumber('0.7')])"
Unfortunately, NumPy support of these advanced Sage types like
Integer
or RealNumber
is not yet at 100%. As a solution,
redefine RealNumber
and/or Integer
to change the behavior of
the Sage preparser, so decimal literals are floats instead of Sage
arbitrary precision real numbers, and integer literals are Python
ints. For example:
sage: RealNumber = float; Integer = int
sage: from scipy import stats
sage: stats.ttest_ind([1,2,3,4,5], [2,3,4,5,.6])
Ttest...Result(statistic=0.0767529..., pvalue=0.940704...)
sage: stats.uniform(0,15).ppf([0.5,0.7])
array([ 7.5, 10.5])
Alternatively, be explicit about data types, e.g.
sage: from scipy import stats
sage: stats.uniform(int(0),int(15)).ppf([float(0.5),float(0.7)])
array([ 7.5, 10.5])
As a third alternative, use the raw suffix:
sage: from scipy import stats
sage: stats.uniform(0r,15r).ppf([0.5r,0.7r])
array([ 7.5, 10.5])
You can also disable the preprocessor in your code via
preparser(False)
. You can start IPython alone from the command
line sage -ipython
which does not pre-load anything
Sage-specific. Or switch the Notebook language to “Python”.
How do I save an object so I don’t have to compute it each time I open a worksheet?#
The save
and load
commands will save and load an object,
respectively.
Does Sage contain a function similar to Mathematica’s ToCharacterCode[]?#
You might want to convert ASCII characters such as “Big Mac” to ASCII
numerals for further processing. In Sage and Python, you can use ord
,
e.g.
sage: list(map(ord, "abcde"))
[97, 98, 99, 100, 101]
sage: list(map(ord, "Big Mac"))
[66, 105, 103, 32, 77, 97, 99]
How can I write multiplication implicitly as in Mathematica?#
Sage has a function that enables this:
sage: implicit_multiplication(True)
sage: x 2 x # not tested
2*x^2
sage: implicit_multiplication(False)
This is preparsed by Sage into Python code. It may not work in a complicated situation. To see what the preparser does:
sage: implicit_multiplication(True)
sage: preparse("2 x")
'Integer(2)*x'
sage: implicit_multiplication(False)
sage: preparse("2 x")
'Integer(2) x'
See https://wiki.sagemath.org/sage_mathematica for more information about Mathematica vs. SageMath.
Can I make Sage automatically execute commands on startup?#
Yes, just make a file $HOME/.sage/init.sage
and it will be
executed any time you start Sage. This assumes that the Sage
environment variable DOT_SAGE
points to the hidden directory
$HOME/.sage
, which by default is the case.
When I compile Sage my computer beeps and shuts down or hangs.#
Compiling Sage is quite taxing on the CPU. The above behavior usually indicates that your computer has overheated. In many cases this can be fixed by cleaning the CPU fan and assuring proper ventilation of the system. Please ask your system administrator or a professional to do this in case you have never done this. Such hardware maintenance, if not performed by a skilled professional, you can potentially damage your system.
For Linux users, if you suspect that the compilation fails because of
a resource issue, a fix might be to edit your /etc/inittab
so that
Linux boots into run level 3. The file /etc/inittab
usually
contains something similar to the following snippet:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have
# networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
which directs your Linux distribution to boot into a graphical login
screen. Comment out the line id:5:initdefault:
and add the line
id:3:initdefault:
, so that you now have something like:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have
# networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
# id:5:initdefault:
id:3:initdefault:
Now if you reboot your system, you will be greeted with a text based login screen. This allows you to log into your system with a text based session from within a virtual terminal. A text based session usually does not consume as much system resources as would be the case with a graphical session. Then build your Sage source distribution from within your text based session. You need to make sure that you can first restore your graphical session, before you attempt to log into a text based session.
When I start Sage, SELinux complains that “/path/to/libpari-gmp.so.2” requires text-relocation. How can I fix it?#
The problem can be fixed by running the following command:
$ chcon -t textrel_shlib_t /path/to/libpari-gmp.so.2
How do I run sage in daemon mode, i.e. as a service?#
There are several possibilities. Use screen
, nohup
or disown
.
The show command for plotting 3-D objects does not work.#
The default live 3-D plotting for Sage 6.4+ uses Jmol/JSmol for viewing. From the command line the Jmol Java application is used, and for in browser viewing either pure javascript or a Java applet is used. By default in browsers pure javascript is used to avoid the problems with some browsers that do not support java applet plugins (namely Chrome). On each browser worksheet there is a checkbox which must be checked before a 3-D plot is generated if the user wants to use the Java applet (the applet is a little faster with complex plots).
The most likely reason for a malfunction is that you do not have a Java Run Time Environment (JRE) installed or you have one older than version 1.7. If things work from the command line another possibility is that your browser does not have the proper plugin to support Java applets (at present, 2014, plugins do not work with most versions of Chrome). Make sure you have installed either the IcedTea browser plugin (for linux see your package manager), see: IcedTea, or the Oracle Java plugin see: Java.
If you are using a Sage server over the web and even javascript rendering does not work, you may have a problem with your browser’s javascript engine or have it turned off.
May I use Sage tools in a commercial environment?#
Yes! Absolutely! Basically the only constraint is that if you make changes to Sage itself and redistribute this changed version of Sage publicly, then you must make these changes available to us so that we can put them into the standard version of Sage (if we want). Otherwise, you are free to use as many copies of Sage as you want completely for free to make money, etc. without paying any license fees at all.
I want to write some Cython code that uses finite field arithmetic but “cimport sage.rings.finite_field_givaro” fails. What can I do?#
You need to give hints to Sage so that it uses C++ (both Givaro and NTL are C++ libraries), and it also needs the GMP and STDC C++ libraries. Here is a small example:
# These comments are hints to Cython about the compiler and
# libraries needed for the Givaro library:
#
# distutils: language = c++
# distutils: libraries = givaro gmpxx gmp m
cimport sage.rings.finite_field_givaro
# Construct a finite field of order 11.
cdef sage.rings.finite_field_givaro.FiniteField_givaro K
K = sage.rings.finite_field_givaro.FiniteField_givaro(11)
print("K is a {}".format(type(K)))
print("K cardinality = {}".format(K.cardinality()))
# Construct two values in the field:
cdef sage.rings.finite_field_givaro.FiniteField_givaroElement x
cdef sage.rings.finite_field_givaro.FiniteField_givaroElement y
x = K(3)
y = K(6)
print("x is a {}".format(type(x)))
print("x = {}".format(x))
print("y = {}".format(y))
print("x has multiplicative order = {}".format(x.multiplicative_order()))
print("y has multiplicative order = {}".format(y.multiplicative_order()))
print("x*y = {}".format(x * y))
# Show that x behaves like a finite field element:
for i in range(1, x.multiplicative_order() + 1):
print("{} {}".format(i, x**i))
assert x*(1/x) == K.one()
To find out more, type
sage.rings.finite_field_givaro.FiniteField_givaro.
at the Sage prompt and hit tab, then use ??
to get more
information on each function. For example:
sage.rings.finite_field_givaro.FiniteField_givaro.one??
tells you more about the multiplicative unit element in the finite field.
I’m getting weird build failures on Mac OS X. How do I fix this?#
Search the build log (install.log) to see if you are getting the following log message:
fork: Resource temporarily unavailable.
If so, try the following. Create (or edit) /etc/launchd.conf
and
include the following:
limit maxproc 512 2048
then reboot. See this page for more details.
How do I plot the cube root (or other odd roots) for negative input?#
This is one of the most frequently asked questions. There are several methods mentioned in the plot documentation, but this one is easiest:
sage: plot(real_nth_root(x, 3), (x, -1, 1))
Graphics object consisting of 1 graphics primitive
On the other hand, note that the straightforward
sage: plot(x^(1/3), (x, -1, 1)) # not tested
produces the expected plot only for positive \(x\). The reason is that Sage returns complex numbers for odd roots of negative numbers when numerically approximated, which is a standard convention.
sage: numerical_approx( (-1)^(1/3) )
0.500000000000000 + 0.866025403784439*I
How do I use the bitwise XOR operator in Sage?#
The exclusive or operator in Sage is ^^
. This also works for
the inplace operator ^^=
:
sage: 3^^2
1
sage: a = 2
sage: a ^^= 8
sage: a
10
If you define two variables and then evaluate as follows:
sage: a = 5; b = 8
sage: a.__xor__(b), 13
(13, 13)
You can also do
sage: (5).__xor__(8)
13
The parentheses are necessary so that Sage does not think you have a real number. There are several ways to define a function:
sage: xor = lambda x, y: x.__xor__(y)
sage: xor(3, 8)
11
Another option, which sneaks around the Sage preparser, is
sage: def xor(a, b):
....: return eval("%s^%s" % (a, b))
sage: xor(3, 8)
11
You can also turn off the Sage preparser with preparser(False)
,
then ^
will work just like in Python. You can later turn on the
preparser with preparser(True)
. That only works in command line
Sage. In a notebook, switch to Python mode.
With objects a and b and a function f, I accidentally typed f(a) = b instead of f(a) == b. This returned a TypeError (as expected), but also deleted the object a. Why?#
It is because of how functions are defined in Sage with the
f(x) = expr
notation using the preparser. Also notice that if you
make this mistake inside of an if
statement, you will get a
SyntaxError
before anything else goes wrong. So in this case,
there is no problem.
How do I use a different browser with the Sage notebook?#
You will need to do this from the command line. Just run a command like this.
Linux (assuming you have Sage in
/usr/bin
):$ env BROWSER=opera /usr/bin/sage --notebook
Mac (assuming you are in the directory of your downloaded Sage). With the Jupyter notebook:
$ BROWSER='open -a Firefox %s' ./sage --notebook jupyter $ BROWSER='open -a Google\ Chrome %s' ./sage --notebook jupyter
Where is the source code for <function>
?#
Functions and classes written in Python or Cython are in general accessible
on the IPython command line with the ??
shortcut:
sage: plot?? # not tested
Signature: plot(*args, **kwds)
Source:
...
Objects that are built into Python or IPython are compiled and will not show, however. There are many functions in Sage implemented as symbolic functions, i.e., they can be used unevaluated as part of symbolic expressions. Their source code may also not be accessible from the command line, especially with elementary functions, because they are coded in C++ for efficiency reasons.


%- include head.html %>
<%- include header.html %> <%- include errorbox.html %>
Find me a game with:
Next Available Opponent
Currently looking for an opponent for you.
Challenge some friends below while you wait.
Challenge by email
send
×
Email sent:
Challenge someone
challenge
Challenge Made
<%- include footer.html %>


To use TensorFlow you need to understand how TensorFlow:
Sessions
.Variables
.TensorFlow is a programming system in which you represent computations as graphs. Nodes in the graph are called ops (short for operations). An op takes zero or more Tensors
, performs some computation, and produces zero or more Tensors
. A Tensor
is a typed multi-dimensional array. For example, you can represent a mini-batch of images as a 4-D array of floating point numbers with dimensions shape(batch, height, width, channels)
.
A TensorFlow graph is a description of computations. To compute anything, a graph must be launched in a Session
. A Session
places the graph ops onto Devices
, such as CPUs or GPUs, and provides methods to execute them. These methods return tensors produced by ops as R vectors, matrices, and multi-dimensional arrays.
This article includes further explanation and short examples for each of these concepts. The article on Using the TensorFlow API from R provides additional details on the R API, including how to access help and additional documentation.
TensorFlow programs are usually structured into a construction phase, that assembles a graph, and an execution phase that uses a session to execute ops in the graph.
For example, it is common to create a graph to represent and train a neural network in the construction phase, and then repeatedly execute a set of training ops in the graph in the execution phase.
To build a graph start with ops that do not need any input (source ops), such as Constant
, and pass their output to other ops that do computation.
The ops constructors in the R API return objects that stand for the output of the constructed ops. You can pass these to other ops constructors to use as inputs.
TensorFlow has a default graph to which ops constructors add nodes. The default graph is sufficient for many applications. See the Graph class documentation for how to explicitly manage multiple graphs.
library(tensorflow)
# Create a Constant op that produces a 1x2 matrix. The op is
# added as a node to the default graph.
#
# The value returned by the constructor represents the output
# of the Constant op.
matrix1 <- tf$constant(matrix(c(3.0, 3.0), nrow = 1, ncol = 2))
# Create another Constant that produces a 2x1 matrix.
matrix2 <- tf$constant(matrix(c(3.0, 3.0), nrow = 2, ncol = 1))
# Create a Matmul op that takes 'matrix1' and 'matrix2' as inputs.
# The returned value, 'product', represents the result of the matrix
# multiplication.
product <- tf$matmul(matrix1, matrix2)
The default graph now has three nodes: two constant()
ops and one matmul()
op. To actually multiply the matrices, and get the result of the multiplication, you must launch the graph in a session.
Launching follows construction. To launch a graph, create a Session
object. Without arguments the session constructor launches the default graph.
See the Session class for the complete session API.
# Launch the default graph.
sess <- tf$Session()
# To run the matmul op we call the session 'run()' method, passing 'product'
# which represents the output of the matmul op. This indicates to the call
# that we want to get the output of the matmul op back.
#
# All inputs needed by the op are run automatically by the session. They
# typically are run in parallel.
#
# The call 'run(product)' thus causes the execution of three ops in the
# graph: the two constants and matmul.
#
# The output of the op is returned in 'result' as a 1x1 matrix.
result <- sess$run(product)
print(result)
## [,1]
## [1,] 18
# Close the Session when we're done.
sess$close()
Sessions should be closed to release resources. You can also enter a Session
with a “with” block. The Session
closes automatically at the end of the with
block.
with(tf$Session() %as% sess, {
result = sess$run(product)
print(result)
})
## [,1]
## [1,] 18
The TensorFlow implementation translates the graph definition into executable operations distributed across available compute resources, such as the CPU or one of your computer’s GPU cards. In general you do not have to specify CPUs or GPUs explicitly. TensorFlow uses your first GPU, if you have one, for as many operations as possible.
If you have more than one GPU available on your machine, to use a GPU beyond the first you must assign ops to it explicitly. Use with...Device
statements to specify which CPU or GPU to use for operations:
with(tf$Session() %as% sess, {
with(tf$device("/gpu:1"), {
matrix1 <- tf$constant(matrix(c(3.0, 3.0), nrow = 1, ncol = 2))
matrix2 <- tf$constant(matrix(c(3.0, 3.0), nrow = 2, ncol = 1))
product <- tf$matmul(matrix1, matrix2)
})
})
Devices are specified with strings. The currently supported devices are:
"/cpu:0"
: The CPU of your machine."/gpu:0"
: The GPU of your machine, if you have one."/gpu:1"
: The second GPU of your machine, etc.See Using GPUs for more information about GPUs and TensorFlow.
To create a TensorFlow cluster, launch a TensorFlow server on each of the machines in the cluster. When you instantiate a Session in your client, you pass it the network location of one of the machines in the cluster:
with(tf$Session("grpc://example.org:2222") %as% sess, {
# Calls to sess.run(...) will be executed on the cluster.
})
This machine becomes the master for the session. The master distributes the graph across other machines in the cluster (workers), much as the local implementation distributes the graph across available compute resources within a machine.
You can use “with(tf$device())” statements to directly specify workers for particular parts of the graph:
with(tf$device("/job:ps/task:0"), {
weights <- tf$Variable(...)
biases <- tf$Variable(...)
})
See the Distributed TensorFlow How To for more information about distributed sessions and clusters.
The examples in the documentation launch the graph with a Session
and use the Session$run()
method to execute operations.
For ease of use in interactive R shells, you can instead use the InteractiveSession
class, and the Tensor$eval()
and Operation$run()
methods. This avoids having to keep a variable holding the session.
# Enter an interactive TensorFlow Session.
library(tensorflow)
sess <- tf$InteractiveSession()
x <- tf$Variable(c(1.0, 2.0))
a <- tf$constant(c(3.0, 3.0))
# Initialize 'x' using the run() method of its initializer op.
x$initializer$run()
# Add an op to subtract 'a' from 'x'. Run it and print the result
sub <- tf$subtract(x, a)
print(sub$eval())
## [1] -2 -1
# Close the Session when we're done.
sess$close()
TensorFlow programs use a tensor data structure to represent all data – only tensors are passed between operations in the computation graph. You can think of a TensorFlow tensor as an n-dimensional array or list. A tensor has a static type, a rank, and a shape. To learn more about how TensorFlow handles these concepts, see the Rank, Shape, and Type reference.
Variables maintain state across executions of the graph. The following example shows a variable serving as a simple counter. See Variables for more details.
# Create a Variable, that will be initialized to the scalar value 0.
state <- tf$Variable(0L, name="counter")
# Create an Op to add one to `state`.
one <- tf$constant(1L)
new_value <- tf$add(state, one)
update <- tf$assign(state, new_value)
# Variables must be initialized by running an `init` Op after having
# launched the graph. We first have to add the `init` Op to the graph.
init_op <- tf$global_variables_initializer()
# Launch the graph and run the ops.
with(tf$Session() %as% sess, {
# Run the 'init' op
sess$run(init_op)
# Print the initial value of 'state'
print(sess$run(state))
# Run the op that updates 'state' and print 'state'.
for (i in 1:3) {
sess$run(update)
print(sess$run(state))
}
})
## [1] 0
## [1] 1
## [1] 2
## [1] 3
The assign()
operation in this code is a part of the expression graph just like the add()
operation, so it does not actually perform the assignment until run()
executes the expression.
You typically represent the parameters of a statistical model as a set of Variables. For example, you would store the weights for a neural network as a tensor in a Variable. During training you update this tensor by running a training graph repeatedly.
To fetch the outputs of operations, execute the graph with a run()
call on the Session
object and pass in the tensors to retrieve. In the previous example we fetched the single node state
, but you can also fetch multiple tensors:
input1 <- tf$constant(3.0)
input2 <- tf$constant(2.0)
input3 <- tf$constant(5.0)
intermed <- tf$add(input2, input3)
mul <- tf$multiply(input1, intermed)
with(tf$Session() %as% sess, {
result = sess$run(list(mul, intermed))
print(result)
})
## [[1]]
## [1] 21
##
## [[2]]
## [1] 7
All the ops needed to produce the values of the requested tensors are run once (not once per requested tensor).
The examples above introduce tensors into the computation graph by storing them in Constants
and Variables
. TensorFlow also provides a feed mechanism for patching a tensor directly into any operation in the graph.
A feed temporarily replaces the output of an operation with a tensor value. You supply feed data as an argument to a run()
call. The feed is only used for the run call to which it is passed. The most common use case involves designating specific operations to be “feed” operations by using tf$placeholder() to create them:
input1 <- tf$placeholder(tf$float32)
input2 <- tf$placeholder(tf$float32)
output <- tf$multiply(input1, input2)
with(tf$Session() %as% sess, {
print(sess$run(output, feed_dict=dict(input1 = 7.0, input2 = 2.0)))
})
## [1] 14
A placeholder()
operation generates an error if you do not supply a feed for it. See the MNIST fully-connected feed tutorial (source code) for a larger-scale example of feeds.


Goals
I want to get into university when I am 17. when I grow up I want to be the first to fully explore the Congo. I also want to be an inventor.
I want to get into university when I am 17. when I grow up I want to be the first to fully explore the Congo. I also want to be an inventor.


{% extends "base_page.html" %} {% load staticfiles pipeline %} {% block extra_css_b %} {% stylesheet 'hopscotch_css' %} {% stylesheet 'sweetalert_css' %} {% stylesheet 'home_css' %} {% endblock extra_css_b %} {% block nav_ul_desktop_b %}
Viewing live video stream of robot
Please use a browser that supports the Canvas Element, like Chrome, Firefox, Safari or Internet Explorer 10
You do not have the current robot booking. Please make a booking in order to send code to the robot.
Please select a script from your computer
{% include 'students/boilerplate.html' %}


Previous
Next
Statement of Marks
Examination held in
NAME OF THE STUDENT:
MEDIUM:
SEAT NO:
INSTITUTION:
CENTRE:
PRN:
Code
Subject
Credits
Internal Marks
(25)
External Marks
(75)
Total Marks
(100)
Grade
Total Credits
G.P.A.
Grade
Grand Total
Result
Percentage
-
-
-
-
-
Place:
Date:
Principal
Controller Of Examinations
Maniben Nanavati Women’s College
SNDT Women’s University
Note: PP=Pass, Ex=Exempted, RR=Result Reserved, AB=Absent, FF=Failed, *Indicates current appearance, +Indicates Grace marks given